azure_mgmt_scheduler 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/azure_mgmt_scheduler.gemspec +4 -5
- data/lib/azure_mgmt_scheduler.rb +3 -72
- data/lib/generated/azure_mgmt_scheduler.rb +74 -0
- data/lib/{azure_mgmt_scheduler → generated/azure_mgmt_scheduler}/job_collections.rb +146 -59
- data/lib/{azure_mgmt_scheduler → generated/azure_mgmt_scheduler}/jobs.rb +105 -50
- data/lib/generated/azure_mgmt_scheduler/models/basic_authentication.rb +62 -0
- data/lib/generated/azure_mgmt_scheduler/models/client_cert_authentication.rb +92 -0
- data/lib/{azure_mgmt_scheduler → generated/azure_mgmt_scheduler}/models/day_of_week.rb +0 -0
- data/lib/generated/azure_mgmt_scheduler/models/http_authentication.rb +47 -0
- data/lib/{azure_mgmt_scheduler → generated/azure_mgmt_scheduler}/models/http_authentication_type.rb +0 -0
- data/lib/generated/azure_mgmt_scheduler/models/http_request.rb +92 -0
- data/lib/generated/azure_mgmt_scheduler/models/job_action.rb +115 -0
- data/lib/{azure_mgmt_scheduler → generated/azure_mgmt_scheduler}/models/job_action_type.rb +0 -0
- data/lib/generated/azure_mgmt_scheduler/models/job_collection_definition.rb +105 -0
- data/lib/generated/azure_mgmt_scheduler/models/job_collection_list_result.rb +95 -0
- data/lib/generated/azure_mgmt_scheduler/models/job_collection_properties.rb +68 -0
- data/lib/generated/azure_mgmt_scheduler/models/job_collection_quota.rb +65 -0
- data/lib/{azure_mgmt_scheduler → generated/azure_mgmt_scheduler}/models/job_collection_state.rb +0 -0
- data/lib/generated/azure_mgmt_scheduler/models/job_definition.rb +78 -0
- data/lib/generated/azure_mgmt_scheduler/models/job_error_action.rb +104 -0
- data/lib/{azure_mgmt_scheduler → generated/azure_mgmt_scheduler}/models/job_execution_status.rb +0 -0
- data/lib/{azure_mgmt_scheduler → generated/azure_mgmt_scheduler}/models/job_history_action_name.rb +0 -0
- data/lib/generated/azure_mgmt_scheduler/models/job_history_definition.rb +80 -0
- data/lib/generated/azure_mgmt_scheduler/models/job_history_definition_properties.rb +126 -0
- data/lib/generated/azure_mgmt_scheduler/models/job_history_filter.rb +46 -0
- data/lib/generated/azure_mgmt_scheduler/models/job_history_list_result.rb +95 -0
- data/lib/generated/azure_mgmt_scheduler/models/job_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_scheduler/models/job_max_recurrence.rb +57 -0
- data/lib/generated/azure_mgmt_scheduler/models/job_properties.rb +90 -0
- data/lib/generated/azure_mgmt_scheduler/models/job_recurrence.rb +90 -0
- data/lib/generated/azure_mgmt_scheduler/models/job_recurrence_schedule.rb +126 -0
- data/lib/generated/azure_mgmt_scheduler/models/job_recurrence_schedule_monthly_occurrence.rb +59 -0
- data/lib/{azure_mgmt_scheduler → generated/azure_mgmt_scheduler}/models/job_schedule_day.rb +0 -0
- data/lib/{azure_mgmt_scheduler → generated/azure_mgmt_scheduler}/models/job_state.rb +0 -0
- data/lib/generated/azure_mgmt_scheduler/models/job_state_filter.rb +46 -0
- data/lib/generated/azure_mgmt_scheduler/models/job_status.rb +93 -0
- data/lib/generated/azure_mgmt_scheduler/models/oauth_authentication.rb +82 -0
- data/lib/{azure_mgmt_scheduler → generated/azure_mgmt_scheduler}/models/recurrence_frequency.rb +0 -0
- data/lib/generated/azure_mgmt_scheduler/models/retry_policy.rb +67 -0
- data/lib/{azure_mgmt_scheduler → generated/azure_mgmt_scheduler}/models/retry_type.rb +0 -0
- data/lib/generated/azure_mgmt_scheduler/models/service_bus_authentication.rb +66 -0
- data/lib/{azure_mgmt_scheduler → generated/azure_mgmt_scheduler}/models/service_bus_authentication_type.rb +0 -0
- data/lib/generated/azure_mgmt_scheduler/models/service_bus_brokered_message_properties.rb +164 -0
- data/lib/generated/azure_mgmt_scheduler/models/service_bus_message.rb +107 -0
- data/lib/generated/azure_mgmt_scheduler/models/service_bus_queue_message.rb +96 -0
- data/lib/generated/azure_mgmt_scheduler/models/service_bus_topic_message.rb +96 -0
- data/lib/{azure_mgmt_scheduler → generated/azure_mgmt_scheduler}/models/service_bus_transport_type.rb +0 -0
- data/lib/generated/azure_mgmt_scheduler/models/sku.rb +46 -0
- data/lib/{azure_mgmt_scheduler → generated/azure_mgmt_scheduler}/models/sku_definition.rb +0 -0
- data/lib/generated/azure_mgmt_scheduler/models/storage_queue_message.rb +74 -0
- data/lib/{azure_mgmt_scheduler → generated/azure_mgmt_scheduler}/module_definition.rb +0 -0
- data/lib/{azure_mgmt_scheduler → generated/azure_mgmt_scheduler}/scheduler_management_client.rb +4 -4
- data/lib/{azure_mgmt_scheduler → generated/azure_mgmt_scheduler}/version.rb +1 -1
- metadata +72 -92
- data/lib/azure_mgmt_scheduler/models/basic_authentication.rb +0 -75
- data/lib/azure_mgmt_scheduler/models/client_cert_authentication.rb +0 -104
- data/lib/azure_mgmt_scheduler/models/http_authentication.rb +0 -61
- data/lib/azure_mgmt_scheduler/models/http_request.rb +0 -99
- data/lib/azure_mgmt_scheduler/models/job_action.rb +0 -159
- data/lib/azure_mgmt_scheduler/models/job_collection_definition.rb +0 -109
- data/lib/azure_mgmt_scheduler/models/job_collection_list_result.rb +0 -86
- data/lib/azure_mgmt_scheduler/models/job_collection_properties.rb +0 -92
- data/lib/azure_mgmt_scheduler/models/job_collection_quota.rb +0 -82
- data/lib/azure_mgmt_scheduler/models/job_definition.rb +0 -89
- data/lib/azure_mgmt_scheduler/models/job_error_action.rb +0 -143
- data/lib/azure_mgmt_scheduler/models/job_history_definition.rb +0 -90
- data/lib/azure_mgmt_scheduler/models/job_history_definition_properties.rb +0 -136
- data/lib/azure_mgmt_scheduler/models/job_history_filter.rb +0 -60
- data/lib/azure_mgmt_scheduler/models/job_history_list_result.rb +0 -87
- data/lib/azure_mgmt_scheduler/models/job_list_result.rb +0 -86
- data/lib/azure_mgmt_scheduler/models/job_max_recurrence.rb +0 -71
- data/lib/azure_mgmt_scheduler/models/job_properties.rb +0 -119
- data/lib/azure_mgmt_scheduler/models/job_recurrence.rb +0 -110
- data/lib/azure_mgmt_scheduler/models/job_recurrence_schedule.rb +0 -156
- data/lib/azure_mgmt_scheduler/models/job_recurrence_schedule_monthly_occurrence.rb +0 -73
- data/lib/azure_mgmt_scheduler/models/job_state_filter.rb +0 -60
- data/lib/azure_mgmt_scheduler/models/job_status.rb +0 -103
- data/lib/azure_mgmt_scheduler/models/oauth_authentication.rb +0 -93
- data/lib/azure_mgmt_scheduler/models/retry_policy.rb +0 -80
- data/lib/azure_mgmt_scheduler/models/service_bus_authentication.rb +0 -78
- data/lib/azure_mgmt_scheduler/models/service_bus_brokered_message_properties.rb +0 -168
- data/lib/azure_mgmt_scheduler/models/service_bus_message.rb +0 -122
- data/lib/azure_mgmt_scheduler/models/service_bus_queue_message.rb +0 -108
- data/lib/azure_mgmt_scheduler/models/service_bus_topic_message.rb +0 -108
- data/lib/azure_mgmt_scheduler/models/sku.rb +0 -60
- data/lib/azure_mgmt_scheduler/models/storage_queue_message.rb +0 -83
@@ -1,71 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
|
-
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
-
# regenerated.
|
5
|
-
|
6
|
-
module Azure::ARM::Scheduler
|
7
|
-
module Models
|
8
|
-
#
|
9
|
-
# Model object.
|
10
|
-
#
|
11
|
-
class JobMaxRecurrence
|
12
|
-
|
13
|
-
include MsRestAzure
|
14
|
-
|
15
|
-
# @return [RecurrenceFrequency] Gets or sets the frequency of recurrence
|
16
|
-
# (second, minute, hour, day, week, month). Possible values include:
|
17
|
-
# 'Minute', 'Hour', 'Day', 'Week', 'Month'
|
18
|
-
attr_accessor :frequency
|
19
|
-
|
20
|
-
# @return [Integer] Gets or sets the interval between retries.
|
21
|
-
attr_accessor :interval
|
22
|
-
|
23
|
-
#
|
24
|
-
# Validate the object. Throws ValidationError if validation fails.
|
25
|
-
#
|
26
|
-
def validate
|
27
|
-
end
|
28
|
-
|
29
|
-
#
|
30
|
-
# Serializes given Model object into Ruby Hash.
|
31
|
-
# @param object Model object to serialize.
|
32
|
-
# @return [Hash] Serialized object in form of Ruby Hash.
|
33
|
-
#
|
34
|
-
def self.serialize_object(object)
|
35
|
-
object.validate
|
36
|
-
output_object = {}
|
37
|
-
|
38
|
-
serialized_property = object.frequency
|
39
|
-
output_object['frequency'] = serialized_property unless serialized_property.nil?
|
40
|
-
|
41
|
-
serialized_property = object.interval
|
42
|
-
output_object['interval'] = serialized_property unless serialized_property.nil?
|
43
|
-
|
44
|
-
output_object
|
45
|
-
end
|
46
|
-
|
47
|
-
#
|
48
|
-
# Deserializes given Ruby Hash into Model object.
|
49
|
-
# @param object [Hash] Ruby Hash object to deserialize.
|
50
|
-
# @return [JobMaxRecurrence] Deserialized object.
|
51
|
-
#
|
52
|
-
def self.deserialize_object(object)
|
53
|
-
return if object.nil?
|
54
|
-
output_object = JobMaxRecurrence.new
|
55
|
-
|
56
|
-
deserialized_property = object['frequency']
|
57
|
-
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
58
|
-
enum_is_valid = RecurrenceFrequency.constants.any? { |e| RecurrenceFrequency.const_get(e).to_s.downcase == deserialized_property.downcase }
|
59
|
-
warn 'Enum RecurrenceFrequency does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
60
|
-
end
|
61
|
-
output_object.frequency = deserialized_property
|
62
|
-
|
63
|
-
deserialized_property = object['interval']
|
64
|
-
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
65
|
-
output_object.interval = deserialized_property
|
66
|
-
|
67
|
-
output_object
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
@@ -1,119 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
|
-
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
-
# regenerated.
|
5
|
-
|
6
|
-
module Azure::ARM::Scheduler
|
7
|
-
module Models
|
8
|
-
#
|
9
|
-
# Model object.
|
10
|
-
#
|
11
|
-
class JobProperties
|
12
|
-
|
13
|
-
include MsRestAzure
|
14
|
-
|
15
|
-
# @return [DateTime] Gets or sets the job start time.
|
16
|
-
attr_accessor :start_time
|
17
|
-
|
18
|
-
# @return [JobAction] Gets or sets the job action.
|
19
|
-
attr_accessor :action
|
20
|
-
|
21
|
-
# @return [JobRecurrence] Gets or sets the job recurrence.
|
22
|
-
attr_accessor :recurrence
|
23
|
-
|
24
|
-
# @return [JobState] Gets or set the job state. Possible values include:
|
25
|
-
# 'Enabled', 'Disabled', 'Faulted', 'Completed'
|
26
|
-
attr_accessor :state
|
27
|
-
|
28
|
-
# @return [JobStatus] Gets the job status.
|
29
|
-
attr_accessor :status
|
30
|
-
|
31
|
-
#
|
32
|
-
# Validate the object. Throws ValidationError if validation fails.
|
33
|
-
#
|
34
|
-
def validate
|
35
|
-
@action.validate unless @action.nil?
|
36
|
-
@recurrence.validate unless @recurrence.nil?
|
37
|
-
@status.validate unless @status.nil?
|
38
|
-
end
|
39
|
-
|
40
|
-
#
|
41
|
-
# Serializes given Model object into Ruby Hash.
|
42
|
-
# @param object Model object to serialize.
|
43
|
-
# @return [Hash] Serialized object in form of Ruby Hash.
|
44
|
-
#
|
45
|
-
def self.serialize_object(object)
|
46
|
-
object.validate
|
47
|
-
output_object = {}
|
48
|
-
|
49
|
-
serialized_property = object.start_time
|
50
|
-
serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ')
|
51
|
-
output_object['startTime'] = serialized_property unless serialized_property.nil?
|
52
|
-
|
53
|
-
serialized_property = object.action
|
54
|
-
unless serialized_property.nil?
|
55
|
-
serialized_property = JobAction.serialize_object(serialized_property)
|
56
|
-
end
|
57
|
-
output_object['action'] = serialized_property unless serialized_property.nil?
|
58
|
-
|
59
|
-
serialized_property = object.recurrence
|
60
|
-
unless serialized_property.nil?
|
61
|
-
serialized_property = JobRecurrence.serialize_object(serialized_property)
|
62
|
-
end
|
63
|
-
output_object['recurrence'] = serialized_property unless serialized_property.nil?
|
64
|
-
|
65
|
-
serialized_property = object.state
|
66
|
-
output_object['state'] = serialized_property unless serialized_property.nil?
|
67
|
-
|
68
|
-
serialized_property = object.status
|
69
|
-
unless serialized_property.nil?
|
70
|
-
serialized_property = JobStatus.serialize_object(serialized_property)
|
71
|
-
end
|
72
|
-
output_object['status'] = serialized_property unless serialized_property.nil?
|
73
|
-
|
74
|
-
output_object
|
75
|
-
end
|
76
|
-
|
77
|
-
#
|
78
|
-
# Deserializes given Ruby Hash into Model object.
|
79
|
-
# @param object [Hash] Ruby Hash object to deserialize.
|
80
|
-
# @return [JobProperties] Deserialized object.
|
81
|
-
#
|
82
|
-
def self.deserialize_object(object)
|
83
|
-
return if object.nil?
|
84
|
-
output_object = JobProperties.new
|
85
|
-
|
86
|
-
deserialized_property = object['startTime']
|
87
|
-
deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty?
|
88
|
-
output_object.start_time = deserialized_property
|
89
|
-
|
90
|
-
deserialized_property = object['action']
|
91
|
-
unless deserialized_property.nil?
|
92
|
-
deserialized_property = JobAction.deserialize_object(deserialized_property)
|
93
|
-
end
|
94
|
-
output_object.action = deserialized_property
|
95
|
-
|
96
|
-
deserialized_property = object['recurrence']
|
97
|
-
unless deserialized_property.nil?
|
98
|
-
deserialized_property = JobRecurrence.deserialize_object(deserialized_property)
|
99
|
-
end
|
100
|
-
output_object.recurrence = deserialized_property
|
101
|
-
|
102
|
-
deserialized_property = object['state']
|
103
|
-
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
104
|
-
enum_is_valid = JobState.constants.any? { |e| JobState.const_get(e).to_s.downcase == deserialized_property.downcase }
|
105
|
-
warn 'Enum JobState does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
106
|
-
end
|
107
|
-
output_object.state = deserialized_property
|
108
|
-
|
109
|
-
deserialized_property = object['status']
|
110
|
-
unless deserialized_property.nil?
|
111
|
-
deserialized_property = JobStatus.deserialize_object(deserialized_property)
|
112
|
-
end
|
113
|
-
output_object.status = deserialized_property
|
114
|
-
|
115
|
-
output_object
|
116
|
-
end
|
117
|
-
end
|
118
|
-
end
|
119
|
-
end
|
@@ -1,110 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
|
-
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
-
# regenerated.
|
5
|
-
|
6
|
-
module Azure::ARM::Scheduler
|
7
|
-
module Models
|
8
|
-
#
|
9
|
-
# Model object.
|
10
|
-
#
|
11
|
-
class JobRecurrence
|
12
|
-
|
13
|
-
include MsRestAzure
|
14
|
-
|
15
|
-
# @return [RecurrenceFrequency] Gets or sets the frequency of recurrence
|
16
|
-
# (second, minute, hour, day, week, month). Possible values include:
|
17
|
-
# 'Minute', 'Hour', 'Day', 'Week', 'Month'
|
18
|
-
attr_accessor :frequency
|
19
|
-
|
20
|
-
# @return [Integer] Gets or sets the interval between retries.
|
21
|
-
attr_accessor :interval
|
22
|
-
|
23
|
-
# @return [Integer] Gets or sets the maximum number of times that the
|
24
|
-
# job should run.
|
25
|
-
attr_accessor :count
|
26
|
-
|
27
|
-
# @return [DateTime] Gets or sets the time at which the job will
|
28
|
-
# complete.
|
29
|
-
attr_accessor :end_time
|
30
|
-
|
31
|
-
# @return [JobRecurrenceSchedule]
|
32
|
-
attr_accessor :schedule
|
33
|
-
|
34
|
-
#
|
35
|
-
# Validate the object. Throws ValidationError if validation fails.
|
36
|
-
#
|
37
|
-
def validate
|
38
|
-
@schedule.validate unless @schedule.nil?
|
39
|
-
end
|
40
|
-
|
41
|
-
#
|
42
|
-
# Serializes given Model object into Ruby Hash.
|
43
|
-
# @param object Model object to serialize.
|
44
|
-
# @return [Hash] Serialized object in form of Ruby Hash.
|
45
|
-
#
|
46
|
-
def self.serialize_object(object)
|
47
|
-
object.validate
|
48
|
-
output_object = {}
|
49
|
-
|
50
|
-
serialized_property = object.frequency
|
51
|
-
output_object['frequency'] = serialized_property unless serialized_property.nil?
|
52
|
-
|
53
|
-
serialized_property = object.interval
|
54
|
-
output_object['interval'] = serialized_property unless serialized_property.nil?
|
55
|
-
|
56
|
-
serialized_property = object.count
|
57
|
-
output_object['count'] = serialized_property unless serialized_property.nil?
|
58
|
-
|
59
|
-
serialized_property = object.end_time
|
60
|
-
serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ')
|
61
|
-
output_object['endTime'] = serialized_property unless serialized_property.nil?
|
62
|
-
|
63
|
-
serialized_property = object.schedule
|
64
|
-
unless serialized_property.nil?
|
65
|
-
serialized_property = JobRecurrenceSchedule.serialize_object(serialized_property)
|
66
|
-
end
|
67
|
-
output_object['schedule'] = serialized_property unless serialized_property.nil?
|
68
|
-
|
69
|
-
output_object
|
70
|
-
end
|
71
|
-
|
72
|
-
#
|
73
|
-
# Deserializes given Ruby Hash into Model object.
|
74
|
-
# @param object [Hash] Ruby Hash object to deserialize.
|
75
|
-
# @return [JobRecurrence] Deserialized object.
|
76
|
-
#
|
77
|
-
def self.deserialize_object(object)
|
78
|
-
return if object.nil?
|
79
|
-
output_object = JobRecurrence.new
|
80
|
-
|
81
|
-
deserialized_property = object['frequency']
|
82
|
-
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
83
|
-
enum_is_valid = RecurrenceFrequency.constants.any? { |e| RecurrenceFrequency.const_get(e).to_s.downcase == deserialized_property.downcase }
|
84
|
-
warn 'Enum RecurrenceFrequency does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
85
|
-
end
|
86
|
-
output_object.frequency = deserialized_property
|
87
|
-
|
88
|
-
deserialized_property = object['interval']
|
89
|
-
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
90
|
-
output_object.interval = deserialized_property
|
91
|
-
|
92
|
-
deserialized_property = object['count']
|
93
|
-
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
94
|
-
output_object.count = deserialized_property
|
95
|
-
|
96
|
-
deserialized_property = object['endTime']
|
97
|
-
deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty?
|
98
|
-
output_object.end_time = deserialized_property
|
99
|
-
|
100
|
-
deserialized_property = object['schedule']
|
101
|
-
unless deserialized_property.nil?
|
102
|
-
deserialized_property = JobRecurrenceSchedule.deserialize_object(deserialized_property)
|
103
|
-
end
|
104
|
-
output_object.schedule = deserialized_property
|
105
|
-
|
106
|
-
output_object
|
107
|
-
end
|
108
|
-
end
|
109
|
-
end
|
110
|
-
end
|
@@ -1,156 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
|
-
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
-
# regenerated.
|
5
|
-
|
6
|
-
module Azure::ARM::Scheduler
|
7
|
-
module Models
|
8
|
-
#
|
9
|
-
# Model object.
|
10
|
-
#
|
11
|
-
class JobRecurrenceSchedule
|
12
|
-
|
13
|
-
include MsRestAzure
|
14
|
-
|
15
|
-
# @return [Array<DayOfWeek>] Gets or sets the days of the week that the
|
16
|
-
# job should execute on.
|
17
|
-
attr_accessor :week_days
|
18
|
-
|
19
|
-
# @return [Array<Integer>] Gets or sets the hours of the day that the
|
20
|
-
# job should execute at.
|
21
|
-
attr_accessor :hours
|
22
|
-
|
23
|
-
# @return [Array<Integer>] Gets or sets the minutes of the hour that the
|
24
|
-
# job should execute at.
|
25
|
-
attr_accessor :minutes
|
26
|
-
|
27
|
-
# @return [Array<Integer>] Gets or sets the days of the month that the
|
28
|
-
# job should execute on. Must be between 1 and 31.
|
29
|
-
attr_accessor :month_days
|
30
|
-
|
31
|
-
# @return [Array<JobRecurrenceScheduleMonthlyOccurrence>] Gets or sets
|
32
|
-
# the occurrences of days within a month.
|
33
|
-
attr_accessor :monthly_occurrences
|
34
|
-
|
35
|
-
#
|
36
|
-
# Validate the object. Throws ValidationError if validation fails.
|
37
|
-
#
|
38
|
-
def validate
|
39
|
-
@week_days.each{ |e| e.validate if e.respond_to?(:validate) } unless @week_days.nil?
|
40
|
-
@hours.each{ |e| e.validate if e.respond_to?(:validate) } unless @hours.nil?
|
41
|
-
@minutes.each{ |e| e.validate if e.respond_to?(:validate) } unless @minutes.nil?
|
42
|
-
@month_days.each{ |e| e.validate if e.respond_to?(:validate) } unless @month_days.nil?
|
43
|
-
@monthly_occurrences.each{ |e| e.validate if e.respond_to?(:validate) } unless @monthly_occurrences.nil?
|
44
|
-
end
|
45
|
-
|
46
|
-
#
|
47
|
-
# Serializes given Model object into Ruby Hash.
|
48
|
-
# @param object Model object to serialize.
|
49
|
-
# @return [Hash] Serialized object in form of Ruby Hash.
|
50
|
-
#
|
51
|
-
def self.serialize_object(object)
|
52
|
-
object.validate
|
53
|
-
output_object = {}
|
54
|
-
|
55
|
-
serialized_property = object.week_days
|
56
|
-
output_object['weekDays'] = serialized_property unless serialized_property.nil?
|
57
|
-
|
58
|
-
serialized_property = object.hours
|
59
|
-
output_object['hours'] = serialized_property unless serialized_property.nil?
|
60
|
-
|
61
|
-
serialized_property = object.minutes
|
62
|
-
output_object['minutes'] = serialized_property unless serialized_property.nil?
|
63
|
-
|
64
|
-
serialized_property = object.month_days
|
65
|
-
output_object['monthDays'] = serialized_property unless serialized_property.nil?
|
66
|
-
|
67
|
-
serialized_property = object.monthly_occurrences
|
68
|
-
unless serialized_property.nil?
|
69
|
-
serializedArray = []
|
70
|
-
serialized_property.each do |element4|
|
71
|
-
unless element4.nil?
|
72
|
-
element4 = JobRecurrenceScheduleMonthlyOccurrence.serialize_object(element4)
|
73
|
-
end
|
74
|
-
serializedArray.push(element4)
|
75
|
-
end
|
76
|
-
serialized_property = serializedArray
|
77
|
-
end
|
78
|
-
output_object['monthlyOccurrences'] = serialized_property unless serialized_property.nil?
|
79
|
-
|
80
|
-
output_object
|
81
|
-
end
|
82
|
-
|
83
|
-
#
|
84
|
-
# Deserializes given Ruby Hash into Model object.
|
85
|
-
# @param object [Hash] Ruby Hash object to deserialize.
|
86
|
-
# @return [JobRecurrenceSchedule] Deserialized object.
|
87
|
-
#
|
88
|
-
def self.deserialize_object(object)
|
89
|
-
return if object.nil?
|
90
|
-
output_object = JobRecurrenceSchedule.new
|
91
|
-
|
92
|
-
deserialized_property = object['weekDays']
|
93
|
-
unless deserialized_property.nil?
|
94
|
-
deserialized_array = []
|
95
|
-
deserialized_property.each do |element5|
|
96
|
-
if (!element5.nil? && !element5.empty?)
|
97
|
-
enum_is_valid = DayOfWeek.constants.any? { |e| DayOfWeek.const_get(e).to_s.downcase == element5.downcase }
|
98
|
-
warn 'Enum DayOfWeek does not contain ' + element5.downcase + ', but was received from the server.' unless enum_is_valid
|
99
|
-
end
|
100
|
-
deserialized_array.push(element5)
|
101
|
-
end
|
102
|
-
deserialized_property = deserialized_array
|
103
|
-
end
|
104
|
-
output_object.week_days = deserialized_property
|
105
|
-
|
106
|
-
deserialized_property = object['hours']
|
107
|
-
unless deserialized_property.nil?
|
108
|
-
deserialized_array = []
|
109
|
-
deserialized_property.each do |element6|
|
110
|
-
element6 = Integer(element6) unless element6.to_s.empty?
|
111
|
-
deserialized_array.push(element6)
|
112
|
-
end
|
113
|
-
deserialized_property = deserialized_array
|
114
|
-
end
|
115
|
-
output_object.hours = deserialized_property
|
116
|
-
|
117
|
-
deserialized_property = object['minutes']
|
118
|
-
unless deserialized_property.nil?
|
119
|
-
deserialized_array = []
|
120
|
-
deserialized_property.each do |element7|
|
121
|
-
element7 = Integer(element7) unless element7.to_s.empty?
|
122
|
-
deserialized_array.push(element7)
|
123
|
-
end
|
124
|
-
deserialized_property = deserialized_array
|
125
|
-
end
|
126
|
-
output_object.minutes = deserialized_property
|
127
|
-
|
128
|
-
deserialized_property = object['monthDays']
|
129
|
-
unless deserialized_property.nil?
|
130
|
-
deserialized_array = []
|
131
|
-
deserialized_property.each do |element8|
|
132
|
-
element8 = Integer(element8) unless element8.to_s.empty?
|
133
|
-
deserialized_array.push(element8)
|
134
|
-
end
|
135
|
-
deserialized_property = deserialized_array
|
136
|
-
end
|
137
|
-
output_object.month_days = deserialized_property
|
138
|
-
|
139
|
-
deserialized_property = object['monthlyOccurrences']
|
140
|
-
unless deserialized_property.nil?
|
141
|
-
deserialized_array = []
|
142
|
-
deserialized_property.each do |element9|
|
143
|
-
unless element9.nil?
|
144
|
-
element9 = JobRecurrenceScheduleMonthlyOccurrence.deserialize_object(element9)
|
145
|
-
end
|
146
|
-
deserialized_array.push(element9)
|
147
|
-
end
|
148
|
-
deserialized_property = deserialized_array
|
149
|
-
end
|
150
|
-
output_object.monthly_occurrences = deserialized_property
|
151
|
-
|
152
|
-
output_object
|
153
|
-
end
|
154
|
-
end
|
155
|
-
end
|
156
|
-
end
|