Class: MicrosoftGraph::Models::AttributeMapping

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/attribute_mapping.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new attributeMapping and sets the default values.



55
56
57
# File 'lib/models/attribute_mapping.rb', line 55

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

Parameters:

  • parse_node

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

Returns:

  • a attribute_mapping

Raises:

  • (StandardError)


63
64
65
66
# File 'lib/models/attribute_mapping.rb', line 63

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

Instance Method Details

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



40
41
42
# File 'lib/models/attribute_mapping.rb', line 40

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.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



48
49
50
# File 'lib/models/attribute_mapping.rb', line 48

def additional_data=(value)
    @additional_data = value
end

#default_valueObject

Gets the defaultValue property value. Default value to be used in case the source property was evaluated to null. Optional.

Returns:

  • a string



71
72
73
# File 'lib/models/attribute_mapping.rb', line 71

def default_value
    return @default_value
end

#default_value=(value) ⇒ Object

Sets the defaultValue property value. Default value to be used in case the source property was evaluated to null. Optional.

Parameters:

  • value

    Value to set for the defaultValue property.

Returns:

  • a void



79
80
81
# File 'lib/models/attribute_mapping.rb', line 79

def default_value=(value)
    @default_value = value
end

#export_missing_referencesObject

Gets the exportMissingReferences property value. For internal use only.

Returns:

  • a boolean



86
87
88
# File 'lib/models/attribute_mapping.rb', line 86

def export_missing_references
    return @export_missing_references
end

#export_missing_references=(value) ⇒ Object

Sets the exportMissingReferences property value. For internal use only.

Parameters:

  • value

    Value to set for the exportMissingReferences property.

Returns:

  • a void



94
95
96
# File 'lib/models/attribute_mapping.rb', line 94

def export_missing_references=(value)
    @export_missing_references = value
end

#flow_behaviorObject

Gets the flowBehavior property value. The flowBehavior property

Returns:

  • a attribute_flow_behavior



101
102
103
# File 'lib/models/attribute_mapping.rb', line 101

def flow_behavior
    return @flow_behavior
end

#flow_behavior=(value) ⇒ Object

Sets the flowBehavior property value. The flowBehavior property

Parameters:

  • value

    Value to set for the flowBehavior property.

Returns:

  • a void



109
110
111
# File 'lib/models/attribute_mapping.rb', line 109

def flow_behavior=(value)
    @flow_behavior = value
end

#flow_typeObject

Gets the flowType property value. The flowType property

Returns:

  • a attribute_flow_type



116
117
118
# File 'lib/models/attribute_mapping.rb', line 116

def flow_type
    return @flow_type
end

#flow_type=(value) ⇒ Object

Sets the flowType property value. The flowType property

Parameters:

  • value

    Value to set for the flowType property.

Returns:

  • a void



124
125
126
# File 'lib/models/attribute_mapping.rb', line 124

def flow_type=(value)
    @flow_type = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/models/attribute_mapping.rb', line 131

def get_field_deserializers()
    return {
        "defaultValue" => lambda {|n| @default_value = n.get_string_value() },
        "exportMissingReferences" => lambda {|n| @export_missing_references = n.get_boolean_value() },
        "flowBehavior" => lambda {|n| @flow_behavior = n.get_enum_value(MicrosoftGraph::Models::AttributeFlowBehavior) },
        "flowType" => lambda {|n| @flow_type = n.get_enum_value(MicrosoftGraph::Models::AttributeFlowType) },
        "matchingPriority" => lambda {|n| @matching_priority = n.get_number_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "source" => lambda {|n| @source = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AttributeMappingSource.create_from_discriminator_value(pn) }) },
        "targetAttributeName" => lambda {|n| @target_attribute_name = n.get_string_value() },
    }
end

#matching_priorityObject

Gets the matchingPriority property value. If higher than 0, this attribute will be used to perform an initial match of the objects between source and target directories. The synchronization engine will try to find the matching object using attribute with lowest value of matching priority first. If not found, the attribute with the next matching priority will be used, and so on a until match is found or no more matching attributes are left. Only attributes that are expected to have unique values, such as email, should be used as matching attributes.

Returns:

  • a integer



147
148
149
# File 'lib/models/attribute_mapping.rb', line 147

def matching_priority
    return @matching_priority
end

#matching_priority=(value) ⇒ Object

Sets the matchingPriority property value. If higher than 0, this attribute will be used to perform an initial match of the objects between source and target directories. The synchronization engine will try to find the matching object using attribute with lowest value of matching priority first. If not found, the attribute with the next matching priority will be used, and so on a until match is found or no more matching attributes are left. Only attributes that are expected to have unique values, such as email, should be used as matching attributes.

Parameters:

  • value

    Value to set for the matchingPriority property.

Returns:

  • a void



155
156
157
# File 'lib/models/attribute_mapping.rb', line 155

def matching_priority=(value)
    @matching_priority = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



162
163
164
# File 'lib/models/attribute_mapping.rb', line 162

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



170
171
172
# File 'lib/models/attribute_mapping.rb', line 170

def odata_type=(value)
    @odata_type = 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)


178
179
180
181
182
183
184
185
186
187
188
189
# File 'lib/models/attribute_mapping.rb', line 178

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("defaultValue", @default_value)
    writer.write_boolean_value("exportMissingReferences", @export_missing_references)
    writer.write_enum_value("flowBehavior", @flow_behavior)
    writer.write_enum_value("flowType", @flow_type)
    writer.write_number_value("matchingPriority", @matching_priority)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_object_value("source", @source)
    writer.write_string_value("targetAttributeName", @target_attribute_name)
    writer.write_additional_data(@additional_data)
end

#sourceObject

Gets the source property value. Defines how a value should be extracted (or transformed) from the source object.

Returns:

  • a attribute_mapping_source



194
195
196
# File 'lib/models/attribute_mapping.rb', line 194

def source
    return @source
end

#source=(value) ⇒ Object

Sets the source property value. Defines how a value should be extracted (or transformed) from the source object.

Parameters:

  • value

    Value to set for the source property.

Returns:

  • a void



202
203
204
# File 'lib/models/attribute_mapping.rb', line 202

def source=(value)
    @source = value
end

#target_attribute_nameObject

Gets the targetAttributeName property value. Name of the attribute on the target object.

Returns:

  • a string



209
210
211
# File 'lib/models/attribute_mapping.rb', line 209

def target_attribute_name
    return @target_attribute_name
end

#target_attribute_name=(value) ⇒ Object

Sets the targetAttributeName property value. Name of the attribute on the target object.

Parameters:

  • value

    Value to set for the targetAttributeName property.

Returns:

  • a void



217
218
219
# File 'lib/models/attribute_mapping.rb', line 217

def target_attribute_name=(value)
    @target_attribute_name = value
end