azure_mgmt_scheduler 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/LICENSE.txt +21 -0
- data/Rakefile +5 -0
- data/azure_mgmt_scheduler.gemspec +35 -0
- data/lib/azure_mgmt_scheduler.rb +73 -0
- data/lib/azure_mgmt_scheduler/job_collections.rb +642 -0
- data/lib/azure_mgmt_scheduler/jobs.rb +616 -0
- data/lib/azure_mgmt_scheduler/models/basic_authentication.rb +75 -0
- data/lib/azure_mgmt_scheduler/models/client_cert_authentication.rb +104 -0
- data/lib/azure_mgmt_scheduler/models/day_of_week.rb +21 -0
- data/lib/azure_mgmt_scheduler/models/http_authentication.rb +61 -0
- data/lib/azure_mgmt_scheduler/models/http_authentication_type.rb +18 -0
- data/lib/azure_mgmt_scheduler/models/http_request.rb +99 -0
- data/lib/azure_mgmt_scheduler/models/job_action.rb +159 -0
- data/lib/azure_mgmt_scheduler/models/job_action_type.rb +19 -0
- data/lib/azure_mgmt_scheduler/models/job_collection_definition.rb +109 -0
- data/lib/azure_mgmt_scheduler/models/job_collection_list_result.rb +86 -0
- data/lib/azure_mgmt_scheduler/models/job_collection_properties.rb +92 -0
- data/lib/azure_mgmt_scheduler/models/job_collection_quota.rb +82 -0
- data/lib/azure_mgmt_scheduler/models/job_collection_state.rb +18 -0
- data/lib/azure_mgmt_scheduler/models/job_definition.rb +89 -0
- data/lib/azure_mgmt_scheduler/models/job_error_action.rb +143 -0
- data/lib/azure_mgmt_scheduler/models/job_execution_status.rb +17 -0
- data/lib/azure_mgmt_scheduler/models/job_history_action_name.rb +16 -0
- data/lib/azure_mgmt_scheduler/models/job_history_definition.rb +90 -0
- data/lib/azure_mgmt_scheduler/models/job_history_definition_properties.rb +136 -0
- data/lib/azure_mgmt_scheduler/models/job_history_filter.rb +60 -0
- data/lib/azure_mgmt_scheduler/models/job_history_list_result.rb +87 -0
- data/lib/azure_mgmt_scheduler/models/job_list_result.rb +86 -0
- data/lib/azure_mgmt_scheduler/models/job_max_recurrence.rb +71 -0
- data/lib/azure_mgmt_scheduler/models/job_properties.rb +119 -0
- data/lib/azure_mgmt_scheduler/models/job_recurrence.rb +110 -0
- data/lib/azure_mgmt_scheduler/models/job_recurrence_schedule.rb +156 -0
- data/lib/azure_mgmt_scheduler/models/job_recurrence_schedule_monthly_occurrence.rb +73 -0
- data/lib/azure_mgmt_scheduler/models/job_schedule_day.rb +21 -0
- data/lib/azure_mgmt_scheduler/models/job_state.rb +18 -0
- data/lib/azure_mgmt_scheduler/models/job_state_filter.rb +60 -0
- data/lib/azure_mgmt_scheduler/models/job_status.rb +103 -0
- data/lib/azure_mgmt_scheduler/models/oauth_authentication.rb +93 -0
- data/lib/azure_mgmt_scheduler/models/recurrence_frequency.rb +19 -0
- data/lib/azure_mgmt_scheduler/models/retry_policy.rb +80 -0
- data/lib/azure_mgmt_scheduler/models/retry_type.rb +16 -0
- data/lib/azure_mgmt_scheduler/models/service_bus_authentication.rb +78 -0
- data/lib/azure_mgmt_scheduler/models/service_bus_authentication_type.rb +16 -0
- data/lib/azure_mgmt_scheduler/models/service_bus_brokered_message_properties.rb +168 -0
- data/lib/azure_mgmt_scheduler/models/service_bus_message.rb +122 -0
- data/lib/azure_mgmt_scheduler/models/service_bus_queue_message.rb +108 -0
- data/lib/azure_mgmt_scheduler/models/service_bus_topic_message.rb +108 -0
- data/lib/azure_mgmt_scheduler/models/service_bus_transport_type.rb +17 -0
- data/lib/azure_mgmt_scheduler/models/sku.rb +60 -0
- data/lib/azure_mgmt_scheduler/models/sku_definition.rb +17 -0
- data/lib/azure_mgmt_scheduler/models/storage_queue_message.rb +83 -0
- data/lib/azure_mgmt_scheduler/module_definition.rb +8 -0
- data/lib/azure_mgmt_scheduler/scheduler_management_client.rb +70 -0
- data/lib/azure_mgmt_scheduler/version.rb +8 -0
- metadata +183 -0
@@ -0,0 +1,156 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.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
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.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 JobRecurrenceScheduleMonthlyOccurrence
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [JobScheduleDay] Gets or sets the day. Must be one of monday,
|
16
|
+
# tuesday, wednesday, thursday, friday, saturday, sunday. Possible
|
17
|
+
# values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday',
|
18
|
+
# 'Friday', 'Saturday', 'Sunday'
|
19
|
+
attr_accessor :day
|
20
|
+
|
21
|
+
# @return [Integer] Gets or sets the occurrence. Must be between -5 and
|
22
|
+
# 5.
|
23
|
+
attr_accessor :occurrence
|
24
|
+
|
25
|
+
#
|
26
|
+
# Validate the object. Throws ValidationError if validation fails.
|
27
|
+
#
|
28
|
+
def validate
|
29
|
+
end
|
30
|
+
|
31
|
+
#
|
32
|
+
# Serializes given Model object into Ruby Hash.
|
33
|
+
# @param object Model object to serialize.
|
34
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
35
|
+
#
|
36
|
+
def self.serialize_object(object)
|
37
|
+
object.validate
|
38
|
+
output_object = {}
|
39
|
+
|
40
|
+
serialized_property = object.day
|
41
|
+
output_object['day'] = serialized_property unless serialized_property.nil?
|
42
|
+
|
43
|
+
serialized_property = object.occurrence
|
44
|
+
output_object['Occurrence'] = serialized_property unless serialized_property.nil?
|
45
|
+
|
46
|
+
output_object
|
47
|
+
end
|
48
|
+
|
49
|
+
#
|
50
|
+
# Deserializes given Ruby Hash into Model object.
|
51
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
52
|
+
# @return [JobRecurrenceScheduleMonthlyOccurrence] Deserialized object.
|
53
|
+
#
|
54
|
+
def self.deserialize_object(object)
|
55
|
+
return if object.nil?
|
56
|
+
output_object = JobRecurrenceScheduleMonthlyOccurrence.new
|
57
|
+
|
58
|
+
deserialized_property = object['day']
|
59
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
60
|
+
enum_is_valid = JobScheduleDay.constants.any? { |e| JobScheduleDay.const_get(e).to_s.downcase == deserialized_property.downcase }
|
61
|
+
warn 'Enum JobScheduleDay does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
62
|
+
end
|
63
|
+
output_object.day = deserialized_property
|
64
|
+
|
65
|
+
deserialized_property = object['Occurrence']
|
66
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
67
|
+
output_object.occurrence = deserialized_property
|
68
|
+
|
69
|
+
output_object
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.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
|
+
# Defines values for JobScheduleDay
|
10
|
+
#
|
11
|
+
module JobScheduleDay
|
12
|
+
Monday = "Monday"
|
13
|
+
Tuesday = "Tuesday"
|
14
|
+
Wednesday = "Wednesday"
|
15
|
+
Thursday = "Thursday"
|
16
|
+
Friday = "Friday"
|
17
|
+
Saturday = "Saturday"
|
18
|
+
Sunday = "Sunday"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.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
|
+
# Defines values for JobState
|
10
|
+
#
|
11
|
+
module JobState
|
12
|
+
Enabled = "Enabled"
|
13
|
+
Disabled = "Disabled"
|
14
|
+
Faulted = "Faulted"
|
15
|
+
Completed = "Completed"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.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 JobStateFilter
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [JobState] Gets or sets the job state. Possible values
|
16
|
+
# include: 'Enabled', 'Disabled', 'Faulted', 'Completed'
|
17
|
+
attr_accessor :state
|
18
|
+
|
19
|
+
#
|
20
|
+
# Validate the object. Throws ValidationError if validation fails.
|
21
|
+
#
|
22
|
+
def validate
|
23
|
+
end
|
24
|
+
|
25
|
+
#
|
26
|
+
# Serializes given Model object into Ruby Hash.
|
27
|
+
# @param object Model object to serialize.
|
28
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
29
|
+
#
|
30
|
+
def self.serialize_object(object)
|
31
|
+
object.validate
|
32
|
+
output_object = {}
|
33
|
+
|
34
|
+
serialized_property = object.state
|
35
|
+
output_object['state'] = serialized_property unless serialized_property.nil?
|
36
|
+
|
37
|
+
output_object
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Deserializes given Ruby Hash into Model object.
|
42
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
43
|
+
# @return [JobStateFilter] Deserialized object.
|
44
|
+
#
|
45
|
+
def self.deserialize_object(object)
|
46
|
+
return if object.nil?
|
47
|
+
output_object = JobStateFilter.new
|
48
|
+
|
49
|
+
deserialized_property = object['state']
|
50
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
51
|
+
enum_is_valid = JobState.constants.any? { |e| JobState.const_get(e).to_s.downcase == deserialized_property.downcase }
|
52
|
+
warn 'Enum JobState does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
53
|
+
end
|
54
|
+
output_object.state = deserialized_property
|
55
|
+
|
56
|
+
output_object
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.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 JobStatus
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Integer] Gets the number of times this job has executed.
|
16
|
+
attr_accessor :execution_count
|
17
|
+
|
18
|
+
# @return [Integer] Gets the number of times this job has failed.
|
19
|
+
attr_accessor :failure_count
|
20
|
+
|
21
|
+
# @return [Integer] Gets the number of faulted occurrences (occurrences
|
22
|
+
# that were retried and failed as many times as the retry policy
|
23
|
+
# states).
|
24
|
+
attr_accessor :faulted_count
|
25
|
+
|
26
|
+
# @return [DateTime] Gets the time the last occurrence executed in
|
27
|
+
# ISO-8601 format. Could be empty if job has not run yet.
|
28
|
+
attr_accessor :last_execution_time
|
29
|
+
|
30
|
+
# @return [DateTime] Gets the time of the next occurrence in ISO-8601
|
31
|
+
# format. Could be empty if the job is completed.
|
32
|
+
attr_accessor :next_execution_time
|
33
|
+
|
34
|
+
#
|
35
|
+
# Validate the object. Throws ValidationError if validation fails.
|
36
|
+
#
|
37
|
+
def validate
|
38
|
+
# Nothing to validate
|
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.execution_count
|
51
|
+
output_object['executionCount'] = serialized_property unless serialized_property.nil?
|
52
|
+
|
53
|
+
serialized_property = object.failure_count
|
54
|
+
output_object['failureCount'] = serialized_property unless serialized_property.nil?
|
55
|
+
|
56
|
+
serialized_property = object.faulted_count
|
57
|
+
output_object['faultedCount'] = serialized_property unless serialized_property.nil?
|
58
|
+
|
59
|
+
serialized_property = object.last_execution_time
|
60
|
+
serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ')
|
61
|
+
output_object['lastExecutionTime'] = serialized_property unless serialized_property.nil?
|
62
|
+
|
63
|
+
serialized_property = object.next_execution_time
|
64
|
+
serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ')
|
65
|
+
output_object['nextExecutionTime'] = serialized_property unless serialized_property.nil?
|
66
|
+
|
67
|
+
output_object
|
68
|
+
end
|
69
|
+
|
70
|
+
#
|
71
|
+
# Deserializes given Ruby Hash into Model object.
|
72
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
73
|
+
# @return [JobStatus] Deserialized object.
|
74
|
+
#
|
75
|
+
def self.deserialize_object(object)
|
76
|
+
return if object.nil?
|
77
|
+
output_object = JobStatus.new
|
78
|
+
|
79
|
+
deserialized_property = object['executionCount']
|
80
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
81
|
+
output_object.execution_count = deserialized_property
|
82
|
+
|
83
|
+
deserialized_property = object['failureCount']
|
84
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
85
|
+
output_object.failure_count = deserialized_property
|
86
|
+
|
87
|
+
deserialized_property = object['faultedCount']
|
88
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
89
|
+
output_object.faulted_count = deserialized_property
|
90
|
+
|
91
|
+
deserialized_property = object['lastExecutionTime']
|
92
|
+
deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty?
|
93
|
+
output_object.last_execution_time = deserialized_property
|
94
|
+
|
95
|
+
deserialized_property = object['nextExecutionTime']
|
96
|
+
deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty?
|
97
|
+
output_object.next_execution_time = deserialized_property
|
98
|
+
|
99
|
+
output_object
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.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 OAuthAuthentication < HttpAuthentication
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets the secret.
|
16
|
+
attr_accessor :secret
|
17
|
+
|
18
|
+
# @return [String] Gets or sets the tenant.
|
19
|
+
attr_accessor :tenant
|
20
|
+
|
21
|
+
# @return [String] Gets or sets the audience.
|
22
|
+
attr_accessor :audience
|
23
|
+
|
24
|
+
# @return [String] Gets or sets the client identifier.
|
25
|
+
attr_accessor :client_id
|
26
|
+
|
27
|
+
#
|
28
|
+
# Validate the object. Throws ValidationError if validation fails.
|
29
|
+
#
|
30
|
+
def validate
|
31
|
+
# Nothing to validate
|
32
|
+
end
|
33
|
+
|
34
|
+
#
|
35
|
+
# Serializes given Model object into Ruby Hash.
|
36
|
+
# @param object Model object to serialize.
|
37
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
38
|
+
#
|
39
|
+
def self.serialize_object(object)
|
40
|
+
object.validate
|
41
|
+
output_object = {}
|
42
|
+
|
43
|
+
serialized_property = object.type
|
44
|
+
output_object['type'] = serialized_property unless serialized_property.nil?
|
45
|
+
|
46
|
+
serialized_property = object.secret
|
47
|
+
output_object['secret'] = serialized_property unless serialized_property.nil?
|
48
|
+
|
49
|
+
serialized_property = object.tenant
|
50
|
+
output_object['tenant'] = serialized_property unless serialized_property.nil?
|
51
|
+
|
52
|
+
serialized_property = object.audience
|
53
|
+
output_object['audience'] = serialized_property unless serialized_property.nil?
|
54
|
+
|
55
|
+
serialized_property = object.client_id
|
56
|
+
output_object['clientId'] = serialized_property unless serialized_property.nil?
|
57
|
+
|
58
|
+
output_object
|
59
|
+
end
|
60
|
+
|
61
|
+
#
|
62
|
+
# Deserializes given Ruby Hash into Model object.
|
63
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
64
|
+
# @return [OAuthAuthentication] Deserialized object.
|
65
|
+
#
|
66
|
+
def self.deserialize_object(object)
|
67
|
+
return if object.nil?
|
68
|
+
output_object = OAuthAuthentication.new
|
69
|
+
|
70
|
+
deserialized_property = object['type']
|
71
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
72
|
+
enum_is_valid = HttpAuthenticationType.constants.any? { |e| HttpAuthenticationType.const_get(e).to_s.downcase == deserialized_property.downcase }
|
73
|
+
warn 'Enum HttpAuthenticationType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
74
|
+
end
|
75
|
+
output_object.type = deserialized_property
|
76
|
+
|
77
|
+
deserialized_property = object['secret']
|
78
|
+
output_object.secret = deserialized_property
|
79
|
+
|
80
|
+
deserialized_property = object['tenant']
|
81
|
+
output_object.tenant = deserialized_property
|
82
|
+
|
83
|
+
deserialized_property = object['audience']
|
84
|
+
output_object.audience = deserialized_property
|
85
|
+
|
86
|
+
deserialized_property = object['clientId']
|
87
|
+
output_object.client_id = deserialized_property
|
88
|
+
|
89
|
+
output_object
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|