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,19 @@
|
|
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 RecurrenceFrequency
|
10
|
+
#
|
11
|
+
module RecurrenceFrequency
|
12
|
+
Minute = "Minute"
|
13
|
+
Hour = "Hour"
|
14
|
+
Day = "Day"
|
15
|
+
Week = "Week"
|
16
|
+
Month = "Month"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,80 @@
|
|
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 RetryPolicy
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [RetryType] Gets or sets the retry strategy to be used.
|
16
|
+
# Possible values include: 'None', 'Fixed'
|
17
|
+
attr_accessor :retry_type
|
18
|
+
|
19
|
+
# @return [Duration] Gets or sets the retry interval between retries.
|
20
|
+
attr_accessor :retry_interval
|
21
|
+
|
22
|
+
# @return [Integer] Gets or sets the number of times a retry should be
|
23
|
+
# attempted.
|
24
|
+
attr_accessor :retry_count
|
25
|
+
|
26
|
+
#
|
27
|
+
# Validate the object. Throws ValidationError if validation fails.
|
28
|
+
#
|
29
|
+
def validate
|
30
|
+
end
|
31
|
+
|
32
|
+
#
|
33
|
+
# Serializes given Model object into Ruby Hash.
|
34
|
+
# @param object Model object to serialize.
|
35
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
36
|
+
#
|
37
|
+
def self.serialize_object(object)
|
38
|
+
object.validate
|
39
|
+
output_object = {}
|
40
|
+
|
41
|
+
serialized_property = object.retry_type
|
42
|
+
output_object['retryType'] = serialized_property unless serialized_property.nil?
|
43
|
+
|
44
|
+
serialized_property = object.retry_interval
|
45
|
+
output_object['retryInterval'] = serialized_property unless serialized_property.nil?
|
46
|
+
|
47
|
+
serialized_property = object.retry_count
|
48
|
+
output_object['retryCount'] = serialized_property unless serialized_property.nil?
|
49
|
+
|
50
|
+
output_object
|
51
|
+
end
|
52
|
+
|
53
|
+
#
|
54
|
+
# Deserializes given Ruby Hash into Model object.
|
55
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
56
|
+
# @return [RetryPolicy] Deserialized object.
|
57
|
+
#
|
58
|
+
def self.deserialize_object(object)
|
59
|
+
return if object.nil?
|
60
|
+
output_object = RetryPolicy.new
|
61
|
+
|
62
|
+
deserialized_property = object['retryType']
|
63
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
64
|
+
enum_is_valid = RetryType.constants.any? { |e| RetryType.const_get(e).to_s.downcase == deserialized_property.downcase }
|
65
|
+
warn 'Enum RetryType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
66
|
+
end
|
67
|
+
output_object.retry_type = deserialized_property
|
68
|
+
|
69
|
+
deserialized_property = object['retryInterval']
|
70
|
+
output_object.retry_interval = deserialized_property
|
71
|
+
|
72
|
+
deserialized_property = object['retryCount']
|
73
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
74
|
+
output_object.retry_count = deserialized_property
|
75
|
+
|
76
|
+
output_object
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,16 @@
|
|
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 RetryType
|
10
|
+
#
|
11
|
+
module RetryType
|
12
|
+
None = "None"
|
13
|
+
Fixed = "Fixed"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,78 @@
|
|
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 ServiceBusAuthentication
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets the SAS key.
|
16
|
+
attr_accessor :sas_key
|
17
|
+
|
18
|
+
# @return [String] Gets or sets the SAS key name.
|
19
|
+
attr_accessor :sas_key_name
|
20
|
+
|
21
|
+
# @return [ServiceBusAuthenticationType] Gets or sets the authentication
|
22
|
+
# type. Possible values include: 'NotSpecified', 'SharedAccessKey'
|
23
|
+
attr_accessor :type
|
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.sas_key
|
41
|
+
output_object['sasKey'] = serialized_property unless serialized_property.nil?
|
42
|
+
|
43
|
+
serialized_property = object.sas_key_name
|
44
|
+
output_object['sasKeyName'] = serialized_property unless serialized_property.nil?
|
45
|
+
|
46
|
+
serialized_property = object.type
|
47
|
+
output_object['type'] = serialized_property unless serialized_property.nil?
|
48
|
+
|
49
|
+
output_object
|
50
|
+
end
|
51
|
+
|
52
|
+
#
|
53
|
+
# Deserializes given Ruby Hash into Model object.
|
54
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
55
|
+
# @return [ServiceBusAuthentication] Deserialized object.
|
56
|
+
#
|
57
|
+
def self.deserialize_object(object)
|
58
|
+
return if object.nil?
|
59
|
+
output_object = ServiceBusAuthentication.new
|
60
|
+
|
61
|
+
deserialized_property = object['sasKey']
|
62
|
+
output_object.sas_key = deserialized_property
|
63
|
+
|
64
|
+
deserialized_property = object['sasKeyName']
|
65
|
+
output_object.sas_key_name = deserialized_property
|
66
|
+
|
67
|
+
deserialized_property = object['type']
|
68
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
69
|
+
enum_is_valid = ServiceBusAuthenticationType.constants.any? { |e| ServiceBusAuthenticationType.const_get(e).to_s.downcase == deserialized_property.downcase }
|
70
|
+
warn 'Enum ServiceBusAuthenticationType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
71
|
+
end
|
72
|
+
output_object.type = deserialized_property
|
73
|
+
|
74
|
+
output_object
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,16 @@
|
|
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 ServiceBusAuthenticationType
|
10
|
+
#
|
11
|
+
module ServiceBusAuthenticationType
|
12
|
+
NotSpecified = "NotSpecified"
|
13
|
+
SharedAccessKey = "SharedAccessKey"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,168 @@
|
|
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 ServiceBusBrokeredMessageProperties
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets the content type.
|
16
|
+
attr_accessor :content_type
|
17
|
+
|
18
|
+
# @return [String] Gets or sets the correlation id.
|
19
|
+
attr_accessor :correlation_id
|
20
|
+
|
21
|
+
# @return [Boolean] Gets or sets the force persistence.
|
22
|
+
attr_accessor :force_persistence
|
23
|
+
|
24
|
+
# @return [String] Gets or sets the label.
|
25
|
+
attr_accessor :label
|
26
|
+
|
27
|
+
# @return [String] Gets or sets the message id.
|
28
|
+
attr_accessor :message_id
|
29
|
+
|
30
|
+
# @return [String] Gets or sets the partition key.
|
31
|
+
attr_accessor :partition_key
|
32
|
+
|
33
|
+
# @return [String] Gets or sets the reply to.
|
34
|
+
attr_accessor :reply_to
|
35
|
+
|
36
|
+
# @return [String] Gets or sets the reply to session id.
|
37
|
+
attr_accessor :reply_to_session_id
|
38
|
+
|
39
|
+
# @return [DateTime] Gets or sets the scheduled enqueue time UTC.
|
40
|
+
attr_accessor :scheduled_enqueue_time_utc
|
41
|
+
|
42
|
+
# @return [String] Gets or sets the session id.
|
43
|
+
attr_accessor :session_id
|
44
|
+
|
45
|
+
# @return [DateTime] Gets or sets the time to live.
|
46
|
+
attr_accessor :time_to_live
|
47
|
+
|
48
|
+
# @return [String] Gets or sets the to.
|
49
|
+
attr_accessor :to
|
50
|
+
|
51
|
+
# @return [String] Gets or sets the via partition key.
|
52
|
+
attr_accessor :via_partition_key
|
53
|
+
|
54
|
+
#
|
55
|
+
# Validate the object. Throws ValidationError if validation fails.
|
56
|
+
#
|
57
|
+
def validate
|
58
|
+
# Nothing to validate
|
59
|
+
end
|
60
|
+
|
61
|
+
#
|
62
|
+
# Serializes given Model object into Ruby Hash.
|
63
|
+
# @param object Model object to serialize.
|
64
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
65
|
+
#
|
66
|
+
def self.serialize_object(object)
|
67
|
+
object.validate
|
68
|
+
output_object = {}
|
69
|
+
|
70
|
+
serialized_property = object.content_type
|
71
|
+
output_object['contentType'] = serialized_property unless serialized_property.nil?
|
72
|
+
|
73
|
+
serialized_property = object.correlation_id
|
74
|
+
output_object['correlationId'] = serialized_property unless serialized_property.nil?
|
75
|
+
|
76
|
+
serialized_property = object.force_persistence
|
77
|
+
output_object['forcePersistence'] = serialized_property unless serialized_property.nil?
|
78
|
+
|
79
|
+
serialized_property = object.label
|
80
|
+
output_object['label'] = serialized_property unless serialized_property.nil?
|
81
|
+
|
82
|
+
serialized_property = object.message_id
|
83
|
+
output_object['messageId'] = serialized_property unless serialized_property.nil?
|
84
|
+
|
85
|
+
serialized_property = object.partition_key
|
86
|
+
output_object['partitionKey'] = serialized_property unless serialized_property.nil?
|
87
|
+
|
88
|
+
serialized_property = object.reply_to
|
89
|
+
output_object['replyTo'] = serialized_property unless serialized_property.nil?
|
90
|
+
|
91
|
+
serialized_property = object.reply_to_session_id
|
92
|
+
output_object['replyToSessionId'] = serialized_property unless serialized_property.nil?
|
93
|
+
|
94
|
+
serialized_property = object.scheduled_enqueue_time_utc
|
95
|
+
serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ')
|
96
|
+
output_object['scheduledEnqueueTimeUtc'] = serialized_property unless serialized_property.nil?
|
97
|
+
|
98
|
+
serialized_property = object.session_id
|
99
|
+
output_object['sessionId'] = serialized_property unless serialized_property.nil?
|
100
|
+
|
101
|
+
serialized_property = object.time_to_live
|
102
|
+
serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ')
|
103
|
+
output_object['timeToLive'] = serialized_property unless serialized_property.nil?
|
104
|
+
|
105
|
+
serialized_property = object.to
|
106
|
+
output_object['to'] = serialized_property unless serialized_property.nil?
|
107
|
+
|
108
|
+
serialized_property = object.via_partition_key
|
109
|
+
output_object['viaPartitionKey'] = serialized_property unless serialized_property.nil?
|
110
|
+
|
111
|
+
output_object
|
112
|
+
end
|
113
|
+
|
114
|
+
#
|
115
|
+
# Deserializes given Ruby Hash into Model object.
|
116
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
117
|
+
# @return [ServiceBusBrokeredMessageProperties] Deserialized object.
|
118
|
+
#
|
119
|
+
def self.deserialize_object(object)
|
120
|
+
return if object.nil?
|
121
|
+
output_object = ServiceBusBrokeredMessageProperties.new
|
122
|
+
|
123
|
+
deserialized_property = object['contentType']
|
124
|
+
output_object.content_type = deserialized_property
|
125
|
+
|
126
|
+
deserialized_property = object['correlationId']
|
127
|
+
output_object.correlation_id = deserialized_property
|
128
|
+
|
129
|
+
deserialized_property = object['forcePersistence']
|
130
|
+
output_object.force_persistence = deserialized_property
|
131
|
+
|
132
|
+
deserialized_property = object['label']
|
133
|
+
output_object.label = deserialized_property
|
134
|
+
|
135
|
+
deserialized_property = object['messageId']
|
136
|
+
output_object.message_id = deserialized_property
|
137
|
+
|
138
|
+
deserialized_property = object['partitionKey']
|
139
|
+
output_object.partition_key = deserialized_property
|
140
|
+
|
141
|
+
deserialized_property = object['replyTo']
|
142
|
+
output_object.reply_to = deserialized_property
|
143
|
+
|
144
|
+
deserialized_property = object['replyToSessionId']
|
145
|
+
output_object.reply_to_session_id = deserialized_property
|
146
|
+
|
147
|
+
deserialized_property = object['scheduledEnqueueTimeUtc']
|
148
|
+
deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty?
|
149
|
+
output_object.scheduled_enqueue_time_utc = deserialized_property
|
150
|
+
|
151
|
+
deserialized_property = object['sessionId']
|
152
|
+
output_object.session_id = deserialized_property
|
153
|
+
|
154
|
+
deserialized_property = object['timeToLive']
|
155
|
+
deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty?
|
156
|
+
output_object.time_to_live = deserialized_property
|
157
|
+
|
158
|
+
deserialized_property = object['to']
|
159
|
+
output_object.to = deserialized_property
|
160
|
+
|
161
|
+
deserialized_property = object['viaPartitionKey']
|
162
|
+
output_object.via_partition_key = deserialized_property
|
163
|
+
|
164
|
+
output_object
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
@@ -0,0 +1,122 @@
|
|
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 ServiceBusMessage
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [ServiceBusAuthentication] Gets or sets the authentication.
|
16
|
+
attr_accessor :authentication
|
17
|
+
|
18
|
+
# @return [ServiceBusBrokeredMessageProperties] Gets or sets the
|
19
|
+
# brokered message properties.
|
20
|
+
attr_accessor :brokered_message_properties
|
21
|
+
|
22
|
+
# @return [Hash{String => String}] Gets or sets the custom message
|
23
|
+
# properties.
|
24
|
+
attr_accessor :custom_message_properties
|
25
|
+
|
26
|
+
# @return [String] Gets or sets the message.
|
27
|
+
attr_accessor :message
|
28
|
+
|
29
|
+
# @return [String] Gets or sets the namespace.
|
30
|
+
attr_accessor :namespace
|
31
|
+
|
32
|
+
# @return [ServiceBusTransportType] Gets or sets the transport type.
|
33
|
+
# Possible values include: 'NotSpecified', 'NetMessaging', 'AMQP'
|
34
|
+
attr_accessor :transport_type
|
35
|
+
|
36
|
+
#
|
37
|
+
# Validate the object. Throws ValidationError if validation fails.
|
38
|
+
#
|
39
|
+
def validate
|
40
|
+
@authentication.validate unless @authentication.nil?
|
41
|
+
@brokered_message_properties.validate unless @brokered_message_properties.nil?
|
42
|
+
@custom_message_properties.each{ |e| e.validate if e.respond_to?(:validate) } unless @custom_message_properties.nil?
|
43
|
+
end
|
44
|
+
|
45
|
+
#
|
46
|
+
# Serializes given Model object into Ruby Hash.
|
47
|
+
# @param object Model object to serialize.
|
48
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
49
|
+
#
|
50
|
+
def self.serialize_object(object)
|
51
|
+
object.validate
|
52
|
+
output_object = {}
|
53
|
+
|
54
|
+
serialized_property = object.authentication
|
55
|
+
unless serialized_property.nil?
|
56
|
+
serialized_property = ServiceBusAuthentication.serialize_object(serialized_property)
|
57
|
+
end
|
58
|
+
output_object['authentication'] = serialized_property unless serialized_property.nil?
|
59
|
+
|
60
|
+
serialized_property = object.brokered_message_properties
|
61
|
+
unless serialized_property.nil?
|
62
|
+
serialized_property = ServiceBusBrokeredMessageProperties.serialize_object(serialized_property)
|
63
|
+
end
|
64
|
+
output_object['brokeredMessageProperties'] = serialized_property unless serialized_property.nil?
|
65
|
+
|
66
|
+
serialized_property = object.custom_message_properties
|
67
|
+
output_object['customMessageProperties'] = serialized_property unless serialized_property.nil?
|
68
|
+
|
69
|
+
serialized_property = object.message
|
70
|
+
output_object['message'] = serialized_property unless serialized_property.nil?
|
71
|
+
|
72
|
+
serialized_property = object.namespace
|
73
|
+
output_object['namespace'] = serialized_property unless serialized_property.nil?
|
74
|
+
|
75
|
+
serialized_property = object.transport_type
|
76
|
+
output_object['transportType'] = serialized_property unless serialized_property.nil?
|
77
|
+
|
78
|
+
output_object
|
79
|
+
end
|
80
|
+
|
81
|
+
#
|
82
|
+
# Deserializes given Ruby Hash into Model object.
|
83
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
84
|
+
# @return [ServiceBusMessage] Deserialized object.
|
85
|
+
#
|
86
|
+
def self.deserialize_object(object)
|
87
|
+
return if object.nil?
|
88
|
+
output_object = ServiceBusMessage.new
|
89
|
+
|
90
|
+
deserialized_property = object['authentication']
|
91
|
+
unless deserialized_property.nil?
|
92
|
+
deserialized_property = ServiceBusAuthentication.deserialize_object(deserialized_property)
|
93
|
+
end
|
94
|
+
output_object.authentication = deserialized_property
|
95
|
+
|
96
|
+
deserialized_property = object['brokeredMessageProperties']
|
97
|
+
unless deserialized_property.nil?
|
98
|
+
deserialized_property = ServiceBusBrokeredMessageProperties.deserialize_object(deserialized_property)
|
99
|
+
end
|
100
|
+
output_object.brokered_message_properties = deserialized_property
|
101
|
+
|
102
|
+
deserialized_property = object['customMessageProperties']
|
103
|
+
output_object.custom_message_properties = deserialized_property
|
104
|
+
|
105
|
+
deserialized_property = object['message']
|
106
|
+
output_object.message = deserialized_property
|
107
|
+
|
108
|
+
deserialized_property = object['namespace']
|
109
|
+
output_object.namespace = deserialized_property
|
110
|
+
|
111
|
+
deserialized_property = object['transportType']
|
112
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
113
|
+
enum_is_valid = ServiceBusTransportType.constants.any? { |e| ServiceBusTransportType.const_get(e).to_s.downcase == deserialized_property.downcase }
|
114
|
+
warn 'Enum ServiceBusTransportType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
115
|
+
end
|
116
|
+
output_object.transport_type = deserialized_property
|
117
|
+
|
118
|
+
output_object
|
119
|
+
end
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|