azure_mgmt_scheduler 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,75 @@
|
|
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 BasicAuthentication < HttpAuthentication
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets the username.
|
16
|
+
attr_accessor :username
|
17
|
+
|
18
|
+
# @return [String] Gets or sets the password.
|
19
|
+
attr_accessor :password
|
20
|
+
|
21
|
+
#
|
22
|
+
# Validate the object. Throws ValidationError if validation fails.
|
23
|
+
#
|
24
|
+
def validate
|
25
|
+
# Nothing to validate
|
26
|
+
end
|
27
|
+
|
28
|
+
#
|
29
|
+
# Serializes given Model object into Ruby Hash.
|
30
|
+
# @param object Model object to serialize.
|
31
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
32
|
+
#
|
33
|
+
def self.serialize_object(object)
|
34
|
+
object.validate
|
35
|
+
output_object = {}
|
36
|
+
|
37
|
+
serialized_property = object.type
|
38
|
+
output_object['type'] = serialized_property unless serialized_property.nil?
|
39
|
+
|
40
|
+
serialized_property = object.username
|
41
|
+
output_object['username'] = serialized_property unless serialized_property.nil?
|
42
|
+
|
43
|
+
serialized_property = object.password
|
44
|
+
output_object['password'] = 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 [BasicAuthentication] Deserialized object.
|
53
|
+
#
|
54
|
+
def self.deserialize_object(object)
|
55
|
+
return if object.nil?
|
56
|
+
output_object = BasicAuthentication.new
|
57
|
+
|
58
|
+
deserialized_property = object['type']
|
59
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
60
|
+
enum_is_valid = HttpAuthenticationType.constants.any? { |e| HttpAuthenticationType.const_get(e).to_s.downcase == deserialized_property.downcase }
|
61
|
+
warn 'Enum HttpAuthenticationType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
62
|
+
end
|
63
|
+
output_object.type = deserialized_property
|
64
|
+
|
65
|
+
deserialized_property = object['username']
|
66
|
+
output_object.username = deserialized_property
|
67
|
+
|
68
|
+
deserialized_property = object['password']
|
69
|
+
output_object.password = deserialized_property
|
70
|
+
|
71
|
+
output_object
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,104 @@
|
|
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 ClientCertAuthentication < HttpAuthentication
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets the password.
|
16
|
+
attr_accessor :password
|
17
|
+
|
18
|
+
# @return [String] Gets or sets the pfx.
|
19
|
+
attr_accessor :pfx
|
20
|
+
|
21
|
+
# @return [String] Gets or sets the certificate thumbprint.
|
22
|
+
attr_accessor :certificate_thumbprint
|
23
|
+
|
24
|
+
# @return [DateTime] Gets or sets the certificate expiration date.
|
25
|
+
attr_accessor :certificate_expiration_date
|
26
|
+
|
27
|
+
# @return [String] Gets or sets the certificate subject name.
|
28
|
+
attr_accessor :certificate_subject_name
|
29
|
+
|
30
|
+
#
|
31
|
+
# Validate the object. Throws ValidationError if validation fails.
|
32
|
+
#
|
33
|
+
def validate
|
34
|
+
# Nothing to validate
|
35
|
+
end
|
36
|
+
|
37
|
+
#
|
38
|
+
# Serializes given Model object into Ruby Hash.
|
39
|
+
# @param object Model object to serialize.
|
40
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
41
|
+
#
|
42
|
+
def self.serialize_object(object)
|
43
|
+
object.validate
|
44
|
+
output_object = {}
|
45
|
+
|
46
|
+
serialized_property = object.type
|
47
|
+
output_object['type'] = serialized_property unless serialized_property.nil?
|
48
|
+
|
49
|
+
serialized_property = object.password
|
50
|
+
output_object['password'] = serialized_property unless serialized_property.nil?
|
51
|
+
|
52
|
+
serialized_property = object.pfx
|
53
|
+
output_object['pfx'] = serialized_property unless serialized_property.nil?
|
54
|
+
|
55
|
+
serialized_property = object.certificate_thumbprint
|
56
|
+
output_object['certificateThumbprint'] = serialized_property unless serialized_property.nil?
|
57
|
+
|
58
|
+
serialized_property = object.certificate_expiration_date
|
59
|
+
serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ')
|
60
|
+
output_object['certificateExpirationDate'] = serialized_property unless serialized_property.nil?
|
61
|
+
|
62
|
+
serialized_property = object.certificate_subject_name
|
63
|
+
output_object['certificateSubjectName'] = serialized_property unless serialized_property.nil?
|
64
|
+
|
65
|
+
output_object
|
66
|
+
end
|
67
|
+
|
68
|
+
#
|
69
|
+
# Deserializes given Ruby Hash into Model object.
|
70
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
71
|
+
# @return [ClientCertAuthentication] Deserialized object.
|
72
|
+
#
|
73
|
+
def self.deserialize_object(object)
|
74
|
+
return if object.nil?
|
75
|
+
output_object = ClientCertAuthentication.new
|
76
|
+
|
77
|
+
deserialized_property = object['type']
|
78
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
79
|
+
enum_is_valid = HttpAuthenticationType.constants.any? { |e| HttpAuthenticationType.const_get(e).to_s.downcase == deserialized_property.downcase }
|
80
|
+
warn 'Enum HttpAuthenticationType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
81
|
+
end
|
82
|
+
output_object.type = deserialized_property
|
83
|
+
|
84
|
+
deserialized_property = object['password']
|
85
|
+
output_object.password = deserialized_property
|
86
|
+
|
87
|
+
deserialized_property = object['pfx']
|
88
|
+
output_object.pfx = deserialized_property
|
89
|
+
|
90
|
+
deserialized_property = object['certificateThumbprint']
|
91
|
+
output_object.certificate_thumbprint = deserialized_property
|
92
|
+
|
93
|
+
deserialized_property = object['certificateExpirationDate']
|
94
|
+
deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty?
|
95
|
+
output_object.certificate_expiration_date = deserialized_property
|
96
|
+
|
97
|
+
deserialized_property = object['certificateSubjectName']
|
98
|
+
output_object.certificate_subject_name = deserialized_property
|
99
|
+
|
100
|
+
output_object
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
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 DayOfWeek
|
10
|
+
#
|
11
|
+
module DayOfWeek
|
12
|
+
Sunday = "Sunday"
|
13
|
+
Monday = "Monday"
|
14
|
+
Tuesday = "Tuesday"
|
15
|
+
Wednesday = "Wednesday"
|
16
|
+
Thursday = "Thursday"
|
17
|
+
Friday = "Friday"
|
18
|
+
Saturday = "Saturday"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,61 @@
|
|
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 HttpAuthentication
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [HttpAuthenticationType] Gets or sets the http authentication
|
16
|
+
# type. Possible values include: 'NotSpecified', 'ClientCertificate',
|
17
|
+
# 'ActiveDirectoryOAuth', 'Basic'
|
18
|
+
attr_accessor :type
|
19
|
+
|
20
|
+
#
|
21
|
+
# Validate the object. Throws ValidationError if validation fails.
|
22
|
+
#
|
23
|
+
def validate
|
24
|
+
end
|
25
|
+
|
26
|
+
#
|
27
|
+
# Serializes given Model object into Ruby Hash.
|
28
|
+
# @param object Model object to serialize.
|
29
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
30
|
+
#
|
31
|
+
def self.serialize_object(object)
|
32
|
+
object.validate
|
33
|
+
output_object = {}
|
34
|
+
|
35
|
+
serialized_property = object.type
|
36
|
+
output_object['type'] = serialized_property unless serialized_property.nil?
|
37
|
+
|
38
|
+
output_object
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Deserializes given Ruby Hash into Model object.
|
43
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
44
|
+
# @return [HttpAuthentication] Deserialized object.
|
45
|
+
#
|
46
|
+
def self.deserialize_object(object)
|
47
|
+
return if object.nil?
|
48
|
+
output_object = HttpAuthentication.new
|
49
|
+
|
50
|
+
deserialized_property = object['type']
|
51
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
52
|
+
enum_is_valid = HttpAuthenticationType.constants.any? { |e| HttpAuthenticationType.const_get(e).to_s.downcase == deserialized_property.downcase }
|
53
|
+
warn 'Enum HttpAuthenticationType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
54
|
+
end
|
55
|
+
output_object.type = deserialized_property
|
56
|
+
|
57
|
+
output_object
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
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 HttpAuthenticationType
|
10
|
+
#
|
11
|
+
module HttpAuthenticationType
|
12
|
+
NotSpecified = "NotSpecified"
|
13
|
+
ClientCertificate = "ClientCertificate"
|
14
|
+
ActiveDirectoryOAuth = "ActiveDirectoryOAuth"
|
15
|
+
Basic = "Basic"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,99 @@
|
|
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 HttpRequest
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [HttpAuthentication] Gets or sets the http authentication.
|
16
|
+
attr_accessor :authentication
|
17
|
+
|
18
|
+
# @return [String] Gets or sets the Uri.
|
19
|
+
attr_accessor :uri
|
20
|
+
|
21
|
+
# @return [String] Gets or sets the method of the request.
|
22
|
+
attr_accessor :method
|
23
|
+
|
24
|
+
# @return [String] Gets or sets the request body.
|
25
|
+
attr_accessor :body
|
26
|
+
|
27
|
+
# @return [Hash{String => String}] Gets or sets the headers.
|
28
|
+
attr_accessor :headers
|
29
|
+
|
30
|
+
#
|
31
|
+
# Validate the object. Throws ValidationError if validation fails.
|
32
|
+
#
|
33
|
+
def validate
|
34
|
+
@authentication.validate unless @authentication.nil?
|
35
|
+
@headers.each{ |e| e.validate if e.respond_to?(:validate) } unless @headers.nil?
|
36
|
+
end
|
37
|
+
|
38
|
+
#
|
39
|
+
# Serializes given Model object into Ruby Hash.
|
40
|
+
# @param object Model object to serialize.
|
41
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
42
|
+
#
|
43
|
+
def self.serialize_object(object)
|
44
|
+
object.validate
|
45
|
+
output_object = {}
|
46
|
+
|
47
|
+
serialized_property = object.authentication
|
48
|
+
unless serialized_property.nil?
|
49
|
+
serialized_property = HttpAuthentication.serialize_object(serialized_property)
|
50
|
+
end
|
51
|
+
output_object['authentication'] = serialized_property unless serialized_property.nil?
|
52
|
+
|
53
|
+
serialized_property = object.uri
|
54
|
+
output_object['uri'] = serialized_property unless serialized_property.nil?
|
55
|
+
|
56
|
+
serialized_property = object.method
|
57
|
+
output_object['method'] = serialized_property unless serialized_property.nil?
|
58
|
+
|
59
|
+
serialized_property = object.body
|
60
|
+
output_object['body'] = serialized_property unless serialized_property.nil?
|
61
|
+
|
62
|
+
serialized_property = object.headers
|
63
|
+
output_object['headers'] = serialized_property unless serialized_property.nil?
|
64
|
+
|
65
|
+
output_object
|
66
|
+
end
|
67
|
+
|
68
|
+
#
|
69
|
+
# Deserializes given Ruby Hash into Model object.
|
70
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
71
|
+
# @return [HttpRequest] Deserialized object.
|
72
|
+
#
|
73
|
+
def self.deserialize_object(object)
|
74
|
+
return if object.nil?
|
75
|
+
output_object = HttpRequest.new
|
76
|
+
|
77
|
+
deserialized_property = object['authentication']
|
78
|
+
unless deserialized_property.nil?
|
79
|
+
deserialized_property = HttpAuthentication.deserialize_object(deserialized_property)
|
80
|
+
end
|
81
|
+
output_object.authentication = deserialized_property
|
82
|
+
|
83
|
+
deserialized_property = object['uri']
|
84
|
+
output_object.uri = deserialized_property
|
85
|
+
|
86
|
+
deserialized_property = object['method']
|
87
|
+
output_object.method = deserialized_property
|
88
|
+
|
89
|
+
deserialized_property = object['body']
|
90
|
+
output_object.body = deserialized_property
|
91
|
+
|
92
|
+
deserialized_property = object['headers']
|
93
|
+
output_object.headers = deserialized_property
|
94
|
+
|
95
|
+
output_object
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,159 @@
|
|
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 JobAction
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [JobActionType] Gets or sets the job action type. Possible
|
16
|
+
# values include: 'Http', 'Https', 'StorageQueue', 'ServiceBusQueue',
|
17
|
+
# 'ServiceBusTopic'
|
18
|
+
attr_accessor :type
|
19
|
+
|
20
|
+
# @return [HttpRequest] Gets or sets the http requests.
|
21
|
+
attr_accessor :request
|
22
|
+
|
23
|
+
# @return [StorageQueueMessage] Gets or sets the storage queue message.
|
24
|
+
attr_accessor :queue_message
|
25
|
+
|
26
|
+
# @return [ServiceBusQueueMessage] Gets or sets the service bus queue
|
27
|
+
# message.
|
28
|
+
attr_accessor :service_bus_queue_message
|
29
|
+
|
30
|
+
# @return [ServiceBusTopicMessage] Gets or sets the service bus topic
|
31
|
+
# message.
|
32
|
+
attr_accessor :service_bus_topic_message
|
33
|
+
|
34
|
+
# @return [RetryPolicy] Gets or sets the retry policy.
|
35
|
+
attr_accessor :retry_policy
|
36
|
+
|
37
|
+
# @return [JobErrorAction] Gets or sets the error action.
|
38
|
+
attr_accessor :error_action
|
39
|
+
|
40
|
+
#
|
41
|
+
# Validate the object. Throws ValidationError if validation fails.
|
42
|
+
#
|
43
|
+
def validate
|
44
|
+
@request.validate unless @request.nil?
|
45
|
+
@queue_message.validate unless @queue_message.nil?
|
46
|
+
@service_bus_queue_message.validate unless @service_bus_queue_message.nil?
|
47
|
+
@service_bus_topic_message.validate unless @service_bus_topic_message.nil?
|
48
|
+
@retry_policy.validate unless @retry_policy.nil?
|
49
|
+
@error_action.validate unless @error_action.nil?
|
50
|
+
end
|
51
|
+
|
52
|
+
#
|
53
|
+
# Serializes given Model object into Ruby Hash.
|
54
|
+
# @param object Model object to serialize.
|
55
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
56
|
+
#
|
57
|
+
def self.serialize_object(object)
|
58
|
+
object.validate
|
59
|
+
output_object = {}
|
60
|
+
|
61
|
+
serialized_property = object.type
|
62
|
+
output_object['type'] = serialized_property unless serialized_property.nil?
|
63
|
+
|
64
|
+
serialized_property = object.request
|
65
|
+
unless serialized_property.nil?
|
66
|
+
serialized_property = HttpRequest.serialize_object(serialized_property)
|
67
|
+
end
|
68
|
+
output_object['request'] = serialized_property unless serialized_property.nil?
|
69
|
+
|
70
|
+
serialized_property = object.queue_message
|
71
|
+
unless serialized_property.nil?
|
72
|
+
serialized_property = StorageQueueMessage.serialize_object(serialized_property)
|
73
|
+
end
|
74
|
+
output_object['queueMessage'] = serialized_property unless serialized_property.nil?
|
75
|
+
|
76
|
+
serialized_property = object.service_bus_queue_message
|
77
|
+
unless serialized_property.nil?
|
78
|
+
serialized_property = ServiceBusQueueMessage.serialize_object(serialized_property)
|
79
|
+
end
|
80
|
+
output_object['serviceBusQueueMessage'] = serialized_property unless serialized_property.nil?
|
81
|
+
|
82
|
+
serialized_property = object.service_bus_topic_message
|
83
|
+
unless serialized_property.nil?
|
84
|
+
serialized_property = ServiceBusTopicMessage.serialize_object(serialized_property)
|
85
|
+
end
|
86
|
+
output_object['serviceBusTopicMessage'] = serialized_property unless serialized_property.nil?
|
87
|
+
|
88
|
+
serialized_property = object.retry_policy
|
89
|
+
unless serialized_property.nil?
|
90
|
+
serialized_property = RetryPolicy.serialize_object(serialized_property)
|
91
|
+
end
|
92
|
+
output_object['retryPolicy'] = serialized_property unless serialized_property.nil?
|
93
|
+
|
94
|
+
serialized_property = object.error_action
|
95
|
+
unless serialized_property.nil?
|
96
|
+
serialized_property = JobErrorAction.serialize_object(serialized_property)
|
97
|
+
end
|
98
|
+
output_object['errorAction'] = serialized_property unless serialized_property.nil?
|
99
|
+
|
100
|
+
output_object
|
101
|
+
end
|
102
|
+
|
103
|
+
#
|
104
|
+
# Deserializes given Ruby Hash into Model object.
|
105
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
106
|
+
# @return [JobAction] Deserialized object.
|
107
|
+
#
|
108
|
+
def self.deserialize_object(object)
|
109
|
+
return if object.nil?
|
110
|
+
output_object = JobAction.new
|
111
|
+
|
112
|
+
deserialized_property = object['type']
|
113
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
114
|
+
enum_is_valid = JobActionType.constants.any? { |e| JobActionType.const_get(e).to_s.downcase == deserialized_property.downcase }
|
115
|
+
warn 'Enum JobActionType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
116
|
+
end
|
117
|
+
output_object.type = deserialized_property
|
118
|
+
|
119
|
+
deserialized_property = object['request']
|
120
|
+
unless deserialized_property.nil?
|
121
|
+
deserialized_property = HttpRequest.deserialize_object(deserialized_property)
|
122
|
+
end
|
123
|
+
output_object.request = deserialized_property
|
124
|
+
|
125
|
+
deserialized_property = object['queueMessage']
|
126
|
+
unless deserialized_property.nil?
|
127
|
+
deserialized_property = StorageQueueMessage.deserialize_object(deserialized_property)
|
128
|
+
end
|
129
|
+
output_object.queue_message = deserialized_property
|
130
|
+
|
131
|
+
deserialized_property = object['serviceBusQueueMessage']
|
132
|
+
unless deserialized_property.nil?
|
133
|
+
deserialized_property = ServiceBusQueueMessage.deserialize_object(deserialized_property)
|
134
|
+
end
|
135
|
+
output_object.service_bus_queue_message = deserialized_property
|
136
|
+
|
137
|
+
deserialized_property = object['serviceBusTopicMessage']
|
138
|
+
unless deserialized_property.nil?
|
139
|
+
deserialized_property = ServiceBusTopicMessage.deserialize_object(deserialized_property)
|
140
|
+
end
|
141
|
+
output_object.service_bus_topic_message = deserialized_property
|
142
|
+
|
143
|
+
deserialized_property = object['retryPolicy']
|
144
|
+
unless deserialized_property.nil?
|
145
|
+
deserialized_property = RetryPolicy.deserialize_object(deserialized_property)
|
146
|
+
end
|
147
|
+
output_object.retry_policy = deserialized_property
|
148
|
+
|
149
|
+
deserialized_property = object['errorAction']
|
150
|
+
unless deserialized_property.nil?
|
151
|
+
deserialized_property = JobErrorAction.deserialize_object(deserialized_property)
|
152
|
+
end
|
153
|
+
output_object.error_action = deserialized_property
|
154
|
+
|
155
|
+
output_object
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
159
|
+
end
|