Class: MicrosoftGraph::Models::ObjectMapping

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new objectMapping and sets the default values.



73
74
75
# File 'lib/models/object_mapping.rb', line 73

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 object_mapping

Raises:

  • (StandardError)


81
82
83
84
# File 'lib/models/object_mapping.rb', line 81

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return ObjectMapping.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



43
44
45
# File 'lib/models/object_mapping.rb', line 43

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



51
52
53
# File 'lib/models/object_mapping.rb', line 51

def additional_data=(value)
    @additional_data = value
end

#attribute_mappingsObject

Gets the attributeMappings property value. Attribute mappings define which attributes to map from the source object into the target object and how they should flow. A number of functions are available to support the transformation of the original source values.

Returns:

  • a attribute_mapping



58
59
60
# File 'lib/models/object_mapping.rb', line 58

def attribute_mappings
    return @attribute_mappings
end

#attribute_mappings=(value) ⇒ Object

Sets the attributeMappings property value. Attribute mappings define which attributes to map from the source object into the target object and how they should flow. A number of functions are available to support the transformation of the original source values.

Parameters:

  • value

    Value to set for the attributeMappings property.

Returns:

  • a void



66
67
68
# File 'lib/models/object_mapping.rb', line 66

def attribute_mappings=(value)
    @attribute_mappings = value
end

#enabledObject

Gets the enabled property value. When true, this object mapping will be processed during synchronization. When false, this object mapping will be skipped.

Returns:

  • a boolean



89
90
91
# File 'lib/models/object_mapping.rb', line 89

def enabled
    return @enabled
end

#enabled=(value) ⇒ Object

Sets the enabled property value. When true, this object mapping will be processed during synchronization. When false, this object mapping will be skipped.

Parameters:

  • value

    Value to set for the enabled property.

Returns:

  • a void



97
98
99
# File 'lib/models/object_mapping.rb', line 97

def enabled=(value)
    @enabled = value
end

#flow_typesObject

Gets the flowTypes property value. The flowTypes property

Returns:

  • a object_flow_types



104
105
106
# File 'lib/models/object_mapping.rb', line 104

def flow_types
    return @flow_types
end

#flow_types=(value) ⇒ Object

Sets the flowTypes property value. The flowTypes property

Parameters:

  • value

    Value to set for the flowTypes property.

Returns:

  • a void



112
113
114
# File 'lib/models/object_mapping.rb', line 112

def flow_types=(value)
    @flow_types = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/models/object_mapping.rb', line 119

def get_field_deserializers()
    return {
        "attributeMappings" => lambda {|n| @attribute_mappings = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AttributeMapping.create_from_discriminator_value(pn) }) },
        "enabled" => lambda {|n| @enabled = n.get_boolean_value() },
        "flowTypes" => lambda {|n| @flow_types = n.get_enum_value(MicrosoftGraph::Models::ObjectFlowTypes) },
        "metadata" => lambda {|n|  = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ObjectMappingMetadataEntry.create_from_discriminator_value(pn) }) },
        "name" => lambda {|n| @name = n.get_string_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "scope" => lambda {|n| @scope = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Filter.create_from_discriminator_value(pn) }) },
        "sourceObjectName" => lambda {|n| @source_object_name = n.get_string_value() },
        "targetObjectName" => lambda {|n| @target_object_name = n.get_string_value() },
    }
end

#metadataObject

Gets the metadata property value. Additional extension properties. Unless mentioned explicitly, metadata values should not be changed.

Returns:

  • a object_mapping_metadata_entry



136
137
138
# File 'lib/models/object_mapping.rb', line 136

def 
    return 
end

#metadata=(value) ⇒ Object

Sets the metadata property value. Additional extension properties. Unless mentioned explicitly, metadata values should not be changed.

Parameters:

  • value

    Value to set for the metadata property.

Returns:

  • a void



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

def metadata=(value)
     = value
end

#nameObject

Gets the name property value. Human-friendly name of the object mapping.

Returns:

  • a string



151
152
153
# File 'lib/models/object_mapping.rb', line 151

def name
    return @name
end

#name=(value) ⇒ Object

Sets the name property value. Human-friendly name of the object mapping.

Parameters:

  • value

    Value to set for the name property.

Returns:

  • a void



159
160
161
# File 'lib/models/object_mapping.rb', line 159

def name=(value)
    @name = value
end

#odata_typeObject

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

Returns:

  • a string



166
167
168
# File 'lib/models/object_mapping.rb', line 166

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



174
175
176
# File 'lib/models/object_mapping.rb', line 174

def odata_type=(value)
    @odata_type = value
end

#scopeObject

Gets the scope property value. Defines a filter to be used when deciding whether a given object should be provisioned. For example, you might want to only provision users that are located in the US.

Returns:

  • a filter



181
182
183
# File 'lib/models/object_mapping.rb', line 181

def scope
    return @scope
end

#scope=(value) ⇒ Object

Sets the scope property value. Defines a filter to be used when deciding whether a given object should be provisioned. For example, you might want to only provision users that are located in the US.

Parameters:

  • value

    Value to set for the scope property.

Returns:

  • a void



189
190
191
# File 'lib/models/object_mapping.rb', line 189

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


197
198
199
200
201
202
203
204
205
206
207
208
209
# File 'lib/models/object_mapping.rb', line 197

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_collection_of_object_values("attributeMappings", @attribute_mappings)
    writer.write_boolean_value("enabled", @enabled)
    writer.write_enum_value("flowTypes", @flow_types)
    writer.write_collection_of_object_values("metadata", )
    writer.write_string_value("name", @name)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_object_value("scope", @scope)
    writer.write_string_value("sourceObjectName", @source_object_name)
    writer.write_string_value("targetObjectName", @target_object_name)
    writer.write_additional_data(@additional_data)
end

#source_object_nameObject

Gets the sourceObjectName property value. Name of the object in the source directory. Must match the object name from the source directory definition.

Returns:

  • a string



214
215
216
# File 'lib/models/object_mapping.rb', line 214

def source_object_name
    return @source_object_name
end

#source_object_name=(value) ⇒ Object

Sets the sourceObjectName property value. Name of the object in the source directory. Must match the object name from the source directory definition.

Parameters:

  • value

    Value to set for the sourceObjectName property.

Returns:

  • a void



222
223
224
# File 'lib/models/object_mapping.rb', line 222

def source_object_name=(value)
    @source_object_name = value
end

#target_object_nameObject

Gets the targetObjectName property value. Name of the object in target directory. Must match the object name from the target directory definition.

Returns:

  • a string



229
230
231
# File 'lib/models/object_mapping.rb', line 229

def target_object_name
    return @target_object_name
end

#target_object_name=(value) ⇒ Object

Sets the targetObjectName property value. Name of the object in target directory. Must match the object name from the target directory definition.

Parameters:

  • value

    Value to set for the targetObjectName property.

Returns:

  • a void



237
238
239
# File 'lib/models/object_mapping.rb', line 237

def target_object_name=(value)
    @target_object_name = value
end