Class: MicrosoftGraph::Models::SynchronizationRule

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new synchronizationRule and sets the default values.



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

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 synchronization_rule

Raises:

  • (StandardError)


87
88
89
90
# File 'lib/models/synchronization_rule.rb', line 87

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



49
50
51
# File 'lib/models/synchronization_rule.rb', line 49

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



57
58
59
# File 'lib/models/synchronization_rule.rb', line 57

def additional_data=(value)
    @additional_data = value
end

#container_filterObject

Gets the containerFilter property value. The containerFilter property

Returns:

  • a container_filter



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

def container_filter
    return @container_filter
end

#container_filter=(value) ⇒ Object

Sets the containerFilter property value. The containerFilter property

Parameters:

  • value

    Value to set for the containerFilter property.

Returns:

  • a void



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

def container_filter=(value)
    @container_filter = value
end

#editableObject

Gets the editable property value. true if the synchronization rule can be customized; false if this rule is read-only and should not be changed.

Returns:

  • a boolean



95
96
97
# File 'lib/models/synchronization_rule.rb', line 95

def editable
    return @editable
end

#editable=(value) ⇒ Object

Sets the editable property value. true if the synchronization rule can be customized; false if this rule is read-only and should not be changed.

Parameters:

  • value

    Value to set for the editable property.

Returns:

  • a void



103
104
105
# File 'lib/models/synchronization_rule.rb', line 103

def editable=(value)
    @editable = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



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

def get_field_deserializers()
    return {
        "containerFilter" => lambda {|n| @container_filter = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ContainerFilter.create_from_discriminator_value(pn) }) },
        "editable" => lambda {|n| @editable = n.get_boolean_value() },
        "groupFilter" => lambda {|n| @group_filter = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::GroupFilter.create_from_discriminator_value(pn) }) },
        "id" => lambda {|n| @id = n.get_string_value() },
        "metadata" => lambda {|n|  = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::StringKeyStringValuePair.create_from_discriminator_value(pn) }) },
        "name" => lambda {|n| @name = n.get_string_value() },
        "objectMappings" => lambda {|n| @object_mappings = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ObjectMapping.create_from_discriminator_value(pn) }) },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "priority" => lambda {|n| @priority = n.get_number_value() },
        "sourceDirectoryName" => lambda {|n| @source_directory_name = n.get_string_value() },
        "targetDirectoryName" => lambda {|n| @target_directory_name = n.get_string_value() },
    }
end

#group_filterObject

Gets the groupFilter property value. The groupFilter property

Returns:

  • a group_filter



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

def group_filter
    return @group_filter
end

#group_filter=(value) ⇒ Object

Sets the groupFilter property value. The groupFilter property

Parameters:

  • value

    Value to set for the groupFilter property.

Returns:

  • a void



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

def group_filter=(value)
    @group_filter = value
end

#idObject

Gets the id property value. Synchronization rule identifier. Must be one of the identifiers recognized by the synchronization engine. Supported rule identifiers can be found in the synchronization template returned by the API.

Returns:

  • a string



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

def id
    return @id
end

#id=(value) ⇒ Object

Sets the id property value. Synchronization rule identifier. Must be one of the identifiers recognized by the synchronization engine. Supported rule identifiers can be found in the synchronization template returned by the API.

Parameters:

  • value

    Value to set for the id property.

Returns:

  • a void



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

def id=(value)
    @id = value
end

#metadataObject

Gets the metadata property value. Additional extension properties. Unless instructed explicitly by the support team, metadata values should not be changed.

Returns:

  • a string_key_string_value_pair



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

def 
    return 
end

#metadata=(value) ⇒ Object

Sets the metadata property value. Additional extension properties. Unless instructed explicitly by the support team, metadata values should not be changed.

Parameters:

  • value

    Value to set for the metadata property.

Returns:

  • a void



167
168
169
# File 'lib/models/synchronization_rule.rb', line 167

def metadata=(value)
     = value
end

#nameObject

Gets the name property value. Human-readable name of the synchronization rule. Not nullable.

Returns:

  • a string



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

def name
    return @name
end

#name=(value) ⇒ Object

Sets the name property value. Human-readable name of the synchronization rule. Not nullable.

Parameters:

  • value

    Value to set for the name property.

Returns:

  • a void



182
183
184
# File 'lib/models/synchronization_rule.rb', line 182

def name=(value)
    @name = value
end

#object_mappingsObject

Gets the objectMappings property value. Collection of object mappings supported by the rule. Tells the synchronization engine which objects should be synchronized.

Returns:

  • a object_mapping



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

def object_mappings
    return @object_mappings
end

#object_mappings=(value) ⇒ Object

Sets the objectMappings property value. Collection of object mappings supported by the rule. Tells the synchronization engine which objects should be synchronized.

Parameters:

  • value

    Value to set for the objectMappings property.

Returns:

  • a void



197
198
199
# File 'lib/models/synchronization_rule.rb', line 197

def object_mappings=(value)
    @object_mappings = value
end

#odata_typeObject

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

Returns:

  • a string



204
205
206
# File 'lib/models/synchronization_rule.rb', line 204

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



212
213
214
# File 'lib/models/synchronization_rule.rb', line 212

def odata_type=(value)
    @odata_type = value
end

#priorityObject

Gets the priority property value. Priority relative to other rules in the synchronizationSchema. Rules with the lowest priority number will be processed first.

Returns:

  • a integer



219
220
221
# File 'lib/models/synchronization_rule.rb', line 219

def priority
    return @priority
end

#priority=(value) ⇒ Object

Sets the priority property value. Priority relative to other rules in the synchronizationSchema. Rules with the lowest priority number will be processed first.

Parameters:

  • value

    Value to set for the priority property.

Returns:

  • a void



227
228
229
# File 'lib/models/synchronization_rule.rb', line 227

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


235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
# File 'lib/models/synchronization_rule.rb', line 235

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_object_value("containerFilter", @container_filter)
    writer.write_boolean_value("editable", @editable)
    writer.write_object_value("groupFilter", @group_filter)
    writer.write_string_value("id", @id)
    writer.write_collection_of_object_values("metadata", )
    writer.write_string_value("name", @name)
    writer.write_collection_of_object_values("objectMappings", @object_mappings)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_number_value("priority", @priority)
    writer.write_string_value("sourceDirectoryName", @source_directory_name)
    writer.write_string_value("targetDirectoryName", @target_directory_name)
    writer.write_additional_data(@additional_data)
end

#source_directory_nameObject

Gets the sourceDirectoryName property value. Name of the source directory. Must match one of the directory definitions in synchronizationSchema.

Returns:

  • a string



254
255
256
# File 'lib/models/synchronization_rule.rb', line 254

def source_directory_name
    return @source_directory_name
end

#source_directory_name=(value) ⇒ Object

Sets the sourceDirectoryName property value. Name of the source directory. Must match one of the directory definitions in synchronizationSchema.

Parameters:

  • value

    Value to set for the sourceDirectoryName property.

Returns:

  • a void



262
263
264
# File 'lib/models/synchronization_rule.rb', line 262

def source_directory_name=(value)
    @source_directory_name = value
end

#target_directory_nameObject

Gets the targetDirectoryName property value. Name of the target directory. Must match one of the directory definitions in synchronizationSchema.

Returns:

  • a string



269
270
271
# File 'lib/models/synchronization_rule.rb', line 269

def target_directory_name
    return @target_directory_name
end

#target_directory_name=(value) ⇒ Object

Sets the targetDirectoryName property value. Name of the target directory. Must match one of the directory definitions in synchronizationSchema.

Parameters:

  • value

    Value to set for the targetDirectoryName property.

Returns:

  • a void



277
278
279
# File 'lib/models/synchronization_rule.rb', line 277

def target_directory_name=(value)
    @target_directory_name = value
end