Class: Azure::ARM::Scheduler::Models::JobCollectionQuota

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/azure_mgmt_scheduler/models/job_collection_quota.rb

Overview

Model object.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#max_job_countInteger

Returns Gets or set the maximum job count.

Returns:

  • (Integer)

    Gets or set the maximum job count.



16
17
18
# File 'lib/azure_mgmt_scheduler/models/job_collection_quota.rb', line 16

def max_job_count
  @max_job_count
end

#max_job_occurrenceInteger

Returns Gets or sets the maximum job occurrence.

Returns:

  • (Integer)

    Gets or sets the maximum job occurrence.



19
20
21
# File 'lib/azure_mgmt_scheduler/models/job_collection_quota.rb', line 19

def max_job_occurrence
  @max_job_occurrence
end

#max_recurrenceJobMaxRecurrence

Returns Gets or set the maximum recurrence.

Returns:



22
23
24
# File 'lib/azure_mgmt_scheduler/models/job_collection_quota.rb', line 22

def max_recurrence
  @max_recurrence
end

Class Method Details

.deserialize_object(object) ⇒ JobCollectionQuota

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/azure_mgmt_scheduler/models/job_collection_quota.rb', line 60

def self.deserialize_object(object)
  return if object.nil?
  output_object = JobCollectionQuota.new

  deserialized_property = object['maxJobCount']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.max_job_count = deserialized_property

  deserialized_property = object['maxJobOccurrence']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.max_job_occurrence = deserialized_property

  deserialized_property = object['maxRecurrence']
  unless deserialized_property.nil?
    deserialized_property = JobMaxRecurrence.deserialize_object(deserialized_property)
  end
  output_object.max_recurrence = deserialized_property

  output_object
end

.serialize_object(object) ⇒ Hash

Serializes given Model object into Ruby Hash.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of Ruby Hash.



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/azure_mgmt_scheduler/models/job_collection_quota.rb', line 36

def self.serialize_object(object)
  object.validate
  output_object = {}

  serialized_property = object.max_job_count
  output_object['maxJobCount'] = serialized_property unless serialized_property.nil?

  serialized_property = object.max_job_occurrence
  output_object['maxJobOccurrence'] = serialized_property unless serialized_property.nil?

  serialized_property = object.max_recurrence
  unless serialized_property.nil?
    serialized_property = JobMaxRecurrence.serialize_object(serialized_property)
  end
  output_object['maxRecurrence'] = serialized_property unless serialized_property.nil?

  output_object
end

Instance Method Details

#validateObject

Validate the object. Throws ValidationError if validation fails.



27
28
29
# File 'lib/azure_mgmt_scheduler/models/job_collection_quota.rb', line 27

def validate
  @max_recurrence.validate unless @max_recurrence.nil?
end