Class: MicrosoftGraph::Models::AttributeDefinition
- Inherits:
-
Object
- Object
- MicrosoftGraph::Models::AttributeDefinition
- Includes:
- MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/attribute_definition.rb
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
-
#additional_data ⇒ Object
Gets the additionalData property value.
-
#additional_data=(value) ⇒ Object
Sets the additionalData property value.
-
#anchor ⇒ Object
Gets the anchor property value.
-
#anchor=(value) ⇒ Object
Sets the anchor property value.
-
#api_expressions ⇒ Object
Gets the apiExpressions property value.
-
#api_expressions=(value) ⇒ Object
Sets the apiExpressions property value.
-
#case_exact ⇒ Object
Gets the caseExact property value.
-
#case_exact=(value) ⇒ Object
Sets the caseExact property value.
-
#default_value ⇒ Object
Gets the defaultValue property value.
-
#default_value=(value) ⇒ Object
Sets the defaultValue property value.
-
#flow_null_values ⇒ Object
Gets the flowNullValues property value.
-
#flow_null_values=(value) ⇒ Object
Sets the flowNullValues property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new attributeDefinition and sets the default values.
-
#metadata ⇒ Object
Gets the metadata property value.
-
#metadata=(value) ⇒ Object
Sets the metadata property value.
-
#multivalued ⇒ Object
Gets the multivalued property value.
-
#multivalued=(value) ⇒ Object
Sets the multivalued property value.
-
#mutability ⇒ Object
Gets the mutability property value.
-
#mutability=(value) ⇒ Object
Sets the mutability property value.
-
#name ⇒ Object
Gets the name property value.
-
#name=(value) ⇒ Object
Sets the name property value.
-
#odata_type ⇒ Object
Gets the @odata.type property value.
-
#odata_type=(value) ⇒ Object
Sets the @odata.type property value.
-
#referenced_objects ⇒ Object
Gets the referencedObjects property value.
-
#referenced_objects=(value) ⇒ Object
Sets the referencedObjects property value.
-
#required ⇒ Object
Gets the required property value.
-
#required=(value) ⇒ Object
Sets the required property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#type ⇒ Object
Gets the type property value.
-
#type=(value) ⇒ Object
Sets the type property value.
Constructor Details
#initialize ⇒ Object
Instantiates a new attributeDefinition and sets the default values.
115 116 117 |
# File 'lib/models/attribute_definition.rb', line 115 def initialize() @additional_data = Hash.new end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
123 124 125 126 |
# File 'lib/models/attribute_definition.rb', line 123 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return AttributeDefinition.new end |
Instance Method Details
#additional_data ⇒ Object
Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
55 56 57 |
# File 'lib/models/attribute_definition.rb', line 55 def additional_data return @additional_data end |
#additional_data=(value) ⇒ Object
Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
63 64 65 |
# File 'lib/models/attribute_definition.rb', line 63 def additional_data=(value) @additional_data = value end |
#anchor ⇒ Object
Gets the anchor property value. true if the attribute should be used as the anchor for the object. Anchor attributes must have a unique value identifying an object, and must be immutable. Default is false. One, and only one, of the object’s attributes must be designated as the anchor to support synchronization.
70 71 72 |
# File 'lib/models/attribute_definition.rb', line 70 def anchor return @anchor end |
#anchor=(value) ⇒ Object
Sets the anchor property value. true if the attribute should be used as the anchor for the object. Anchor attributes must have a unique value identifying an object, and must be immutable. Default is false. One, and only one, of the object’s attributes must be designated as the anchor to support synchronization.
78 79 80 |
# File 'lib/models/attribute_definition.rb', line 78 def anchor=(value) @anchor = value end |
#api_expressions ⇒ Object
Gets the apiExpressions property value. The apiExpressions property
85 86 87 |
# File 'lib/models/attribute_definition.rb', line 85 def api_expressions return @api_expressions end |
#api_expressions=(value) ⇒ Object
Sets the apiExpressions property value. The apiExpressions property
93 94 95 |
# File 'lib/models/attribute_definition.rb', line 93 def api_expressions=(value) @api_expressions = value end |
#case_exact ⇒ Object
Gets the caseExact property value. true if value of this attribute should be treated as case-sensitive. This setting affects how the synchronization engine detects changes for the attribute.
100 101 102 |
# File 'lib/models/attribute_definition.rb', line 100 def case_exact return @case_exact end |
#case_exact=(value) ⇒ Object
Sets the caseExact property value. true if value of this attribute should be treated as case-sensitive. This setting affects how the synchronization engine detects changes for the attribute.
108 109 110 |
# File 'lib/models/attribute_definition.rb', line 108 def case_exact=(value) @case_exact = value end |
#default_value ⇒ Object
Gets the defaultValue property value. The defaultValue property
131 132 133 |
# File 'lib/models/attribute_definition.rb', line 131 def default_value return @default_value end |
#default_value=(value) ⇒ Object
Sets the defaultValue property value. The defaultValue property
139 140 141 |
# File 'lib/models/attribute_definition.rb', line 139 def default_value=(value) @default_value = value end |
#flow_null_values ⇒ Object
Gets the flowNullValues property value. ‘true’ to allow null values for attributes.
146 147 148 |
# File 'lib/models/attribute_definition.rb', line 146 def flow_null_values return @flow_null_values end |
#flow_null_values=(value) ⇒ Object
Sets the flowNullValues property value. ‘true’ to allow null values for attributes.
154 155 156 |
# File 'lib/models/attribute_definition.rb', line 154 def flow_null_values=(value) @flow_null_values = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/models/attribute_definition.rb', line 161 def get_field_deserializers() return { "anchor" => lambda {|n| @anchor = n.get_boolean_value() }, "apiExpressions" => lambda {|n| @api_expressions = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::StringKeyStringValuePair.create_from_discriminator_value(pn) }) }, "caseExact" => lambda {|n| @case_exact = n.get_boolean_value() }, "defaultValue" => lambda {|n| @default_value = n.get_string_value() }, "flowNullValues" => lambda {|n| @flow_null_values = n.get_boolean_value() }, "metadata" => lambda {|n| = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AttributeDefinitionMetadataEntry.create_from_discriminator_value(pn) }) }, "multivalued" => lambda {|n| @multivalued = n.get_boolean_value() }, "mutability" => lambda {|n| @mutability = n.get_enum_value(MicrosoftGraph::Models::Mutability) }, "name" => lambda {|n| @name = n.get_string_value() }, "@odata.type" => lambda {|n| @odata_type = n.get_string_value() }, "referencedObjects" => lambda {|n| @referenced_objects = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ReferencedObject.create_from_discriminator_value(pn) }) }, "required" => lambda {|n| @required = n.get_boolean_value() }, "type" => lambda {|n| @type = n.get_enum_value(MicrosoftGraph::Models::AttributeType) }, } end |
#metadata ⇒ Object
Gets the metadata property value. Metadata for the given object.
182 183 184 |
# File 'lib/models/attribute_definition.rb', line 182 def return end |
#metadata=(value) ⇒ Object
Sets the metadata property value. Metadata for the given object.
190 191 192 |
# File 'lib/models/attribute_definition.rb', line 190 def (value) = value end |
#multivalued ⇒ Object
Gets the multivalued property value. true if an attribute can have multiple values. Default is false.
197 198 199 |
# File 'lib/models/attribute_definition.rb', line 197 def multivalued return @multivalued end |
#multivalued=(value) ⇒ Object
Sets the multivalued property value. true if an attribute can have multiple values. Default is false.
205 206 207 |
# File 'lib/models/attribute_definition.rb', line 205 def multivalued=(value) @multivalued = value end |
#mutability ⇒ Object
Gets the mutability property value. The mutability property
212 213 214 |
# File 'lib/models/attribute_definition.rb', line 212 def mutability return @mutability end |
#mutability=(value) ⇒ Object
Sets the mutability property value. The mutability property
220 221 222 |
# File 'lib/models/attribute_definition.rb', line 220 def mutability=(value) @mutability = value end |
#name ⇒ Object
Gets the name property value. Name of the attribute. Must be unique within the object definition. Not nullable.
227 228 229 |
# File 'lib/models/attribute_definition.rb', line 227 def name return @name end |
#name=(value) ⇒ Object
Sets the name property value. Name of the attribute. Must be unique within the object definition. Not nullable.
235 236 237 |
# File 'lib/models/attribute_definition.rb', line 235 def name=(value) @name = value end |
#odata_type ⇒ Object
Gets the @odata.type property value. The OdataType property
242 243 244 |
# File 'lib/models/attribute_definition.rb', line 242 def odata_type return @odata_type end |
#odata_type=(value) ⇒ Object
Sets the @odata.type property value. The OdataType property
250 251 252 |
# File 'lib/models/attribute_definition.rb', line 250 def odata_type=(value) @odata_type = value end |
#referenced_objects ⇒ Object
Gets the referencedObjects property value. For attributes with reference type, lists referenced objects (for example, the manager attribute would list User as the referenced object).
257 258 259 |
# File 'lib/models/attribute_definition.rb', line 257 def referenced_objects return @referenced_objects end |
#referenced_objects=(value) ⇒ Object
Sets the referencedObjects property value. For attributes with reference type, lists referenced objects (for example, the manager attribute would list User as the referenced object).
265 266 267 |
# File 'lib/models/attribute_definition.rb', line 265 def referenced_objects=(value) @referenced_objects = value end |
#required ⇒ Object
Gets the required property value. true if attribute is required. Object can not be created if any of the required attributes are missing. If during synchronization, the required attribute has no value, the default value will be used. If default the value was not set, synchronization will record an error.
272 273 274 |
# File 'lib/models/attribute_definition.rb', line 272 def required return @required end |
#required=(value) ⇒ Object
Sets the required property value. true if attribute is required. Object can not be created if any of the required attributes are missing. If during synchronization, the required attribute has no value, the default value will be used. If default the value was not set, synchronization will record an error.
280 281 282 |
# File 'lib/models/attribute_definition.rb', line 280 def required=(value) @required = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/models/attribute_definition.rb', line 288 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? writer.write_boolean_value("anchor", @anchor) writer.write_collection_of_object_values("apiExpressions", @api_expressions) writer.write_boolean_value("caseExact", @case_exact) writer.write_string_value("defaultValue", @default_value) writer.write_boolean_value("flowNullValues", @flow_null_values) writer.write_collection_of_object_values("metadata", ) writer.write_boolean_value("multivalued", @multivalued) writer.write_enum_value("mutability", @mutability) writer.write_string_value("name", @name) writer.write_string_value("@odata.type", @odata_type) writer.write_collection_of_object_values("referencedObjects", @referenced_objects) writer.write_boolean_value("required", @required) writer.write_enum_value("type", @type) writer.write_additional_data(@additional_data) end |
#type ⇒ Object
Gets the type property value. The type property
309 310 311 |
# File 'lib/models/attribute_definition.rb', line 309 def type return @type end |
#type=(value) ⇒ Object
Sets the type property value. The type property
317 318 319 |
# File 'lib/models/attribute_definition.rb', line 317 def type=(value) @type = value end |