Class: MicrosoftGraph::Models::SynchronizationJob

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/synchronization_job.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new synchronizationJob and sets the default values.



28
29
30
# File 'lib/models/synchronization_job.rb', line 28

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

Parameters:

  • parse_node

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

Returns:

  • a synchronization_job

Raises:

  • (StandardError)


36
37
38
39
# File 'lib/models/synchronization_job.rb', line 36

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



44
45
46
47
48
49
50
51
52
# File 'lib/models/synchronization_job.rb', line 44

def get_field_deserializers()
    return super.merge({
        "schedule" => lambda {|n| @schedule = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SynchronizationSchedule.create_from_discriminator_value(pn) }) },
        "schema" => lambda {|n| @schema = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SynchronizationSchema.create_from_discriminator_value(pn) }) },
        "status" => lambda {|n| @status = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::SynchronizationStatus.create_from_discriminator_value(pn) }) },
        "synchronizationJobSettings" => lambda {|n| @synchronization_job_settings = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::KeyValuePair.create_from_discriminator_value(pn) }) },
        "templateId" => lambda {|n| @template_id = n.get_string_value() },
    })
end

#scheduleObject

Gets the schedule property value. Schedule used to run the job. Read-only.

Returns:

  • a synchronization_schedule



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

def schedule
    return @schedule
end

#schedule=(value) ⇒ Object

Sets the schedule property value. Schedule used to run the job. Read-only.

Parameters:

  • value

    Value to set for the schedule property.

Returns:

  • a void



65
66
67
# File 'lib/models/synchronization_job.rb', line 65

def schedule=(value)
    @schedule = value
end

#schemaObject

Gets the schema property value. The synchronization schema configured for the job.

Returns:

  • a synchronization_schema



72
73
74
# File 'lib/models/synchronization_job.rb', line 72

def schema
    return @schema
end

#schema=(value) ⇒ Object

Sets the schema property value. The synchronization schema configured for the job.

Parameters:

  • value

    Value to set for the schema property.

Returns:

  • a void



80
81
82
# File 'lib/models/synchronization_job.rb', line 80

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


88
89
90
91
92
93
94
95
96
# File 'lib/models/synchronization_job.rb', line 88

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_object_value("schedule", @schedule)
    writer.write_object_value("schema", @schema)
    writer.write_object_value("status", @status)
    writer.write_collection_of_object_values("synchronizationJobSettings", @synchronization_job_settings)
    writer.write_string_value("templateId", @template_id)
end

#statusObject

Gets the status property value. Status of the job, which includes when the job was last run, current job state, and errors.

Returns:

  • a synchronization_status



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

def status
    return @status
end

#status=(value) ⇒ Object

Sets the status property value. Status of the job, which includes when the job was last run, current job state, and errors.

Parameters:

  • value

    Value to set for the status property.

Returns:

  • a void



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

def status=(value)
    @status = value
end

#synchronization_job_settingsObject

Gets the synchronizationJobSettings property value. Settings associated with the job. Some settings are inherited from the template.

Returns:

  • a key_value_pair



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

def synchronization_job_settings
    return @synchronization_job_settings
end

#synchronization_job_settings=(value) ⇒ Object

Sets the synchronizationJobSettings property value. Settings associated with the job. Some settings are inherited from the template.

Parameters:

  • value

    Value to set for the synchronizationJobSettings property.

Returns:

  • a void



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

def synchronization_job_settings=(value)
    @synchronization_job_settings = value
end

#template_idObject

Gets the templateId property value. Identifier of the synchronization template this job is based on.

Returns:

  • a string



131
132
133
# File 'lib/models/synchronization_job.rb', line 131

def template_id
    return @template_id
end

#template_id=(value) ⇒ Object

Sets the templateId property value. Identifier of the synchronization template this job is based on.

Parameters:

  • value

    Value to set for the templateId property.

Returns:

  • a void



139
140
141
# File 'lib/models/synchronization_job.rb', line 139

def template_id=(value)
    @template_id = value
end