Class: MicrosoftGraph::Models::Agreement

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/agreement.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new agreement and sets the default values.



52
53
54
# File 'lib/models/agreement.rb', line 52

def initialize()
    super
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a agreement

Raises:

  • (StandardError)


60
61
62
63
# File 'lib/models/agreement.rb', line 60

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return Agreement.new
end

Instance Method Details

#acceptancesObject

Gets the acceptances property value. Read-only. Information about acceptances of this agreement.

Returns:

  • a agreement_acceptance



37
38
39
# File 'lib/models/agreement.rb', line 37

def acceptances
    return @acceptances
end

#acceptances=(value) ⇒ Object

Sets the acceptances property value. Read-only. Information about acceptances of this agreement.

Parameters:

  • value

    Value to set for the acceptances property.

Returns:

  • a void



45
46
47
# File 'lib/models/agreement.rb', line 45

def acceptances=(value)
    @acceptances = value
end

#display_nameObject

Gets the displayName property value. Display name of the agreement. The display name is used for internal tracking of the agreement but is not shown to end users who view the agreement. Supports $filter (eq).

Returns:

  • a string



68
69
70
# File 'lib/models/agreement.rb', line 68

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Display name of the agreement. The display name is used for internal tracking of the agreement but is not shown to end users who view the agreement. Supports $filter (eq).

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



76
77
78
# File 'lib/models/agreement.rb', line 76

def display_name=(value)
    @display_name = value
end

#fileObject

Gets the file property value. Default PDF linked to this agreement.

Returns:

  • a agreement_file



83
84
85
# File 'lib/models/agreement.rb', line 83

def file
    return @file
end

#file=(value) ⇒ Object

Sets the file property value. Default PDF linked to this agreement.

Parameters:

  • value

    Value to set for the file property.

Returns:

  • a void



91
92
93
# File 'lib/models/agreement.rb', line 91

def file=(value)
    @file = value
end

#filesObject

Gets the files property value. PDFs linked to this agreement. This property is in the process of being deprecated. Use the file property instead. Supports $expand.

Returns:

  • a agreement_file_localization



98
99
100
# File 'lib/models/agreement.rb', line 98

def files
    return @files
end

#files=(value) ⇒ Object

Sets the files property value. PDFs linked to this agreement. This property is in the process of being deprecated. Use the file property instead. Supports $expand.

Parameters:

  • value

    Value to set for the files property.

Returns:

  • a void



106
107
108
# File 'lib/models/agreement.rb', line 106

def files=(value)
    @files = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/models/agreement.rb', line 113

def get_field_deserializers()
    return super.merge({
        "acceptances" => lambda {|n| @acceptances = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AgreementAcceptance.create_from_discriminator_value(pn) }) },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "file" => lambda {|n| @file = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AgreementFile.create_from_discriminator_value(pn) }) },
        "files" => lambda {|n| @files = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AgreementFileLocalization.create_from_discriminator_value(pn) }) },
        "isPerDeviceAcceptanceRequired" => lambda {|n| @is_per_device_acceptance_required = n.get_boolean_value() },
        "isViewingBeforeAcceptanceRequired" => lambda {|n| @is_viewing_before_acceptance_required = n.get_boolean_value() },
        "termsExpiration" => lambda {|n| @terms_expiration = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::TermsExpiration.create_from_discriminator_value(pn) }) },
        "userReacceptRequiredFrequency" => lambda {|n| @user_reaccept_required_frequency = n.get_duration_value() },
    })
end

#is_per_device_acceptance_requiredObject

Gets the isPerDeviceAcceptanceRequired property value. Indicates whether end users are required to accept this agreement on every device that they access it from. The end user is required to register their device in Azure AD, if they haven’t already done so. Supports $filter (eq).

Returns:

  • a boolean



129
130
131
# File 'lib/models/agreement.rb', line 129

def is_per_device_acceptance_required
    return @is_per_device_acceptance_required
end

#is_per_device_acceptance_required=(value) ⇒ Object

Sets the isPerDeviceAcceptanceRequired property value. Indicates whether end users are required to accept this agreement on every device that they access it from. The end user is required to register their device in Azure AD, if they haven’t already done so. Supports $filter (eq).

Parameters:

  • value

    Value to set for the isPerDeviceAcceptanceRequired property.

Returns:

  • a void



137
138
139
# File 'lib/models/agreement.rb', line 137

def is_per_device_acceptance_required=(value)
    @is_per_device_acceptance_required = value
end

#is_viewing_before_acceptance_requiredObject

Gets the isViewingBeforeAcceptanceRequired property value. Indicates whether the user has to expand the agreement before accepting. Supports $filter (eq).

Returns:

  • a boolean



144
145
146
# File 'lib/models/agreement.rb', line 144

def is_viewing_before_acceptance_required
    return @is_viewing_before_acceptance_required
end

#is_viewing_before_acceptance_required=(value) ⇒ Object

Sets the isViewingBeforeAcceptanceRequired property value. Indicates whether the user has to expand the agreement before accepting. Supports $filter (eq).

Parameters:

  • value

    Value to set for the isViewingBeforeAcceptanceRequired property.

Returns:

  • a void



152
153
154
# File 'lib/models/agreement.rb', line 152

def is_viewing_before_acceptance_required=(value)
    @is_viewing_before_acceptance_required = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/models/agreement.rb', line 160

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_object_values("acceptances", @acceptances)
    writer.write_string_value("displayName", @display_name)
    writer.write_object_value("file", @file)
    writer.write_collection_of_object_values("files", @files)
    writer.write_boolean_value("isPerDeviceAcceptanceRequired", @is_per_device_acceptance_required)
    writer.write_boolean_value("isViewingBeforeAcceptanceRequired", @is_viewing_before_acceptance_required)
    writer.write_object_value("termsExpiration", @terms_expiration)
    writer.write_duration_value("userReacceptRequiredFrequency", @user_reaccept_required_frequency)
end

#terms_expirationObject

Gets the termsExpiration property value. Expiration schedule and frequency of agreement for all users. Supports $filter (eq).

Returns:

  • a terms_expiration



176
177
178
# File 'lib/models/agreement.rb', line 176

def terms_expiration
    return @terms_expiration
end

#terms_expiration=(value) ⇒ Object

Sets the termsExpiration property value. Expiration schedule and frequency of agreement for all users. Supports $filter (eq).

Parameters:

  • value

    Value to set for the termsExpiration property.

Returns:

  • a void



184
185
186
# File 'lib/models/agreement.rb', line 184

def terms_expiration=(value)
    @terms_expiration = value
end

#user_reaccept_required_frequencyObject

Gets the userReacceptRequiredFrequency property value. The duration after which the user must re-accept the terms of use. The value is represented in ISO 8601 format for durations. Supports $filter (eq).

Returns:

  • a microsoft_kiota_abstractions::_i_s_o_duration



191
192
193
# File 'lib/models/agreement.rb', line 191

def user_reaccept_required_frequency
    return @user_reaccept_required_frequency
end

#user_reaccept_required_frequency=(value) ⇒ Object

Sets the userReacceptRequiredFrequency property value. The duration after which the user must re-accept the terms of use. The value is represented in ISO 8601 format for durations. Supports $filter (eq).

Parameters:

  • value

    Value to set for the userReacceptRequiredFrequency property.

Returns:

  • a void



199
200
201
# File 'lib/models/agreement.rb', line 199

def user_reaccept_required_frequency=(value)
    @user_reaccept_required_frequency = value
end