Class: MicrosoftGraph::Models::AgreementFileProperties
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/agreement_file_properties.rb
Direct Known Subclasses
AgreementFile, AgreementFileLocalization, AgreementFileVersion
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#created_date_time ⇒ Object
Gets the createdDateTime property value.
-
#created_date_time=(value) ⇒ Object
Sets the createdDateTime property value.
-
#display_name ⇒ Object
Gets the displayName property value.
-
#display_name=(value) ⇒ Object
Sets the displayName property value.
-
#file_data ⇒ Object
Gets the fileData property value.
-
#file_data=(value) ⇒ Object
Sets the fileData property value.
-
#file_name ⇒ Object
Gets the fileName property value.
-
#file_name=(value) ⇒ Object
Sets the fileName property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new agreementFileProperties and sets the default values.
-
#is_default ⇒ Object
Gets the isDefault property value.
-
#is_default=(value) ⇒ Object
Sets the isDefault property value.
-
#is_major_version ⇒ Object
Gets the isMajorVersion property value.
-
#is_major_version=(value) ⇒ Object
Sets the isMajorVersion property value.
-
#language ⇒ Object
Gets the language property value.
-
#language=(value) ⇒ Object
Sets the language property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new agreementFileProperties and sets the default values.
35 36 37 |
# File 'lib/models/agreement_file_properties.rb', line 35 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
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/models/agreement_file_properties.rb', line 58 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? mapping_value_node = parse_node.get_child_node("@odata.type") unless mapping_value_node.nil? then mapping_value = mapping_value_node.get_string_value case mapping_value when "#microsoft.graph.agreementFile" return AgreementFile.new when "#microsoft.graph.agreementFileLocalization" return AgreementFileLocalization.new when "#microsoft.graph.agreementFileVersion" return AgreementFileVersion.new end end return AgreementFileProperties.new end |
Instance Method Details
#created_date_time ⇒ Object
Gets the createdDateTime property value. The date time representing when the file was created.The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.
42 43 44 |
# File 'lib/models/agreement_file_properties.rb', line 42 def created_date_time return @created_date_time end |
#created_date_time=(value) ⇒ Object
Sets the createdDateTime property value. The date time representing when the file was created.The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.
50 51 52 |
# File 'lib/models/agreement_file_properties.rb', line 50 def created_date_time=(value) @created_date_time = value end |
#display_name ⇒ Object
Gets the displayName property value. Localized display name of the policy file of an agreement. The localized display name is shown to end users who view the agreement.
78 79 80 |
# File 'lib/models/agreement_file_properties.rb', line 78 def display_name return @display_name end |
#display_name=(value) ⇒ Object
Sets the displayName property value. Localized display name of the policy file of an agreement. The localized display name is shown to end users who view the agreement.
86 87 88 |
# File 'lib/models/agreement_file_properties.rb', line 86 def display_name=(value) @display_name = value end |
#file_data ⇒ Object
Gets the fileData property value. Data that represents the terms of use PDF document. Read-only.
93 94 95 |
# File 'lib/models/agreement_file_properties.rb', line 93 def file_data return @file_data end |
#file_data=(value) ⇒ Object
Sets the fileData property value. Data that represents the terms of use PDF document. Read-only.
101 102 103 |
# File 'lib/models/agreement_file_properties.rb', line 101 def file_data=(value) @file_data = value end |
#file_name ⇒ Object
Gets the fileName property value. Name of the agreement file (for example, TOU.pdf). Read-only.
108 109 110 |
# File 'lib/models/agreement_file_properties.rb', line 108 def file_name return @file_name end |
#file_name=(value) ⇒ Object
Sets the fileName property value. Name of the agreement file (for example, TOU.pdf). Read-only.
116 117 118 |
# File 'lib/models/agreement_file_properties.rb', line 116 def file_name=(value) @file_name = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/models/agreement_file_properties.rb', line 123 def get_field_deserializers() return super.merge({ "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() }, "displayName" => lambda {|n| @display_name = n.get_string_value() }, "fileData" => lambda {|n| @file_data = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AgreementFileData.create_from_discriminator_value(pn) }) }, "fileName" => lambda {|n| @file_name = n.get_string_value() }, "isDefault" => lambda {|n| @is_default = n.get_boolean_value() }, "isMajorVersion" => lambda {|n| @is_major_version = n.get_boolean_value() }, "language" => lambda {|n| @language = n.get_string_value() }, }) end |
#is_default ⇒ Object
Gets the isDefault property value. If none of the languages matches the client preference, indicates whether this is the default agreement file . If none of the files are marked as default, the first one is treated as the default. Read-only.
138 139 140 |
# File 'lib/models/agreement_file_properties.rb', line 138 def is_default return @is_default end |
#is_default=(value) ⇒ Object
Sets the isDefault property value. If none of the languages matches the client preference, indicates whether this is the default agreement file . If none of the files are marked as default, the first one is treated as the default. Read-only.
146 147 148 |
# File 'lib/models/agreement_file_properties.rb', line 146 def is_default=(value) @is_default = value end |
#is_major_version ⇒ Object
Gets the isMajorVersion property value. Indicates whether the agreement file is a major version update. Major version updates invalidate the agreement’s acceptances on the corresponding language.
153 154 155 |
# File 'lib/models/agreement_file_properties.rb', line 153 def is_major_version return @is_major_version end |
#is_major_version=(value) ⇒ Object
Sets the isMajorVersion property value. Indicates whether the agreement file is a major version update. Major version updates invalidate the agreement’s acceptances on the corresponding language.
161 162 163 |
# File 'lib/models/agreement_file_properties.rb', line 161 def is_major_version=(value) @is_major_version = value end |
#language ⇒ Object
Gets the language property value. The language of the agreement file in the format ‘languagecode2-country/regioncode2’. ‘languagecode2’ is a lowercase two-letter code derived from ISO 639-1, while ‘country/regioncode2’ is derived from ISO 3166 and usually consists of two uppercase letters, or a BCP-47 language tag. For example, U.S. English is en-US. Read-only.
168 169 170 |
# File 'lib/models/agreement_file_properties.rb', line 168 def language return @language end |
#language=(value) ⇒ Object
Sets the language property value. The language of the agreement file in the format ‘languagecode2-country/regioncode2’. ‘languagecode2’ is a lowercase two-letter code derived from ISO 639-1, while ‘country/regioncode2’ is derived from ISO 3166 and usually consists of two uppercase letters, or a BCP-47 language tag. For example, U.S. English is en-US. Read-only.
176 177 178 |
# File 'lib/models/agreement_file_properties.rb', line 176 def language=(value) @language = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/models/agreement_file_properties.rb', line 184 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_date_time_value("createdDateTime", @created_date_time) writer.write_string_value("displayName", @display_name) writer.write_object_value("fileData", @file_data) writer.write_string_value("fileName", @file_name) writer.write_boolean_value("isDefault", @is_default) writer.write_boolean_value("isMajorVersion", @is_major_version) writer.write_string_value("language", @language) end |