azure_mgmt_resources 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.rspec +3 -0
- data/.travis.yml +3 -0
- data/Gemfile +14 -0
- data/LICENSE.txt +21 -0
- data/README.md +106 -0
- data/Rakefile +5 -0
- data/azure_mgmt_resources.gemspec +38 -0
- data/lib/azure_mgmt_resources.rb +74 -0
- data/lib/azure_mgmt_resources/Models/basic_dependency.rb +76 -0
- data/lib/azure_mgmt_resources/Models/dependency.rb +105 -0
- data/lib/azure_mgmt_resources/Models/deployment.rb +64 -0
- data/lib/azure_mgmt_resources/Models/deployment_extended.rb +83 -0
- data/lib/azure_mgmt_resources/Models/deployment_extended_filter.rb +58 -0
- data/lib/azure_mgmt_resources/Models/deployment_list_result.rb +88 -0
- data/lib/azure_mgmt_resources/Models/deployment_mode.rb +15 -0
- data/lib/azure_mgmt_resources/Models/deployment_operation.rb +83 -0
- data/lib/azure_mgmt_resources/Models/deployment_operation_properties.rb +102 -0
- data/lib/azure_mgmt_resources/Models/deployment_operations_list_result.rb +88 -0
- data/lib/azure_mgmt_resources/Models/deployment_properties.rb +116 -0
- data/lib/azure_mgmt_resources/Models/deployment_properties_extended.rb +216 -0
- data/lib/azure_mgmt_resources/Models/deployment_validate_result.rb +82 -0
- data/lib/azure_mgmt_resources/Models/generic_resource.rb +103 -0
- data/lib/azure_mgmt_resources/Models/generic_resource_filter.rb +76 -0
- data/lib/azure_mgmt_resources/Models/parameters_link.rb +68 -0
- data/lib/azure_mgmt_resources/Models/plan.rb +85 -0
- data/lib/azure_mgmt_resources/Models/provider.rb +106 -0
- data/lib/azure_mgmt_resources/Models/provider_list_result.rb +87 -0
- data/lib/azure_mgmt_resources/Models/provider_resource_type.rb +88 -0
- data/lib/azure_mgmt_resources/Models/resource_group.rb +105 -0
- data/lib/azure_mgmt_resources/Models/resource_group_extended.rb +113 -0
- data/lib/azure_mgmt_resources/Models/resource_group_extended_filter.rb +63 -0
- data/lib/azure_mgmt_resources/Models/resource_group_filter.rb +67 -0
- data/lib/azure_mgmt_resources/Models/resource_group_format_resource_properties.rb +54 -0
- data/lib/azure_mgmt_resources/Models/resource_group_list_result.rb +88 -0
- data/lib/azure_mgmt_resources/Models/resource_group_properties.rb +58 -0
- data/lib/azure_mgmt_resources/Models/resource_list_result.rb +88 -0
- data/lib/azure_mgmt_resources/Models/resource_management_error.rb +77 -0
- data/lib/azure_mgmt_resources/Models/resource_management_error_with_details.rb +106 -0
- data/lib/azure_mgmt_resources/Models/resource_provider_operation_definition.rb +74 -0
- data/lib/azure_mgmt_resources/Models/resource_provider_operation_detail_list_result.rb +80 -0
- data/lib/azure_mgmt_resources/Models/resource_provider_operation_display_properties.rb +95 -0
- data/lib/azure_mgmt_resources/Models/resources_move_info.rb +67 -0
- data/lib/azure_mgmt_resources/Models/tag_count.rb +67 -0
- data/lib/azure_mgmt_resources/Models/tag_details.rb +112 -0
- data/lib/azure_mgmt_resources/Models/tag_value.rb +82 -0
- data/lib/azure_mgmt_resources/Models/tags_list_result.rb +87 -0
- data/lib/azure_mgmt_resources/Models/target_resource.rb +76 -0
- data/lib/azure_mgmt_resources/Models/template_link.rb +68 -0
- data/lib/azure_mgmt_resources/deployment_operations.rb +297 -0
- data/lib/azure_mgmt_resources/deployments.rb +601 -0
- data/lib/azure_mgmt_resources/module_definition.rb +6 -0
- data/lib/azure_mgmt_resources/providers.rb +461 -0
- data/lib/azure_mgmt_resources/resource_groups.rb +891 -0
- data/lib/azure_mgmt_resources/resource_management_client.rb +85 -0
- data/lib/azure_mgmt_resources/resource_provider_operation_details.rb +126 -0
- data/lib/azure_mgmt_resources/resources.rb +737 -0
- data/lib/azure_mgmt_resources/tags.rb +546 -0
- data/lib/azure_mgmt_resources/version.rb +6 -0
- metadata +235 -0
@@ -0,0 +1,88 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.11.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Resources
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# List of deployment operations.
|
10
|
+
#
|
11
|
+
class DeploymentOperationsListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<DeploymentOperation>] Gets or sets the list of
|
16
|
+
# deployments.
|
17
|
+
attr_accessor :value
|
18
|
+
|
19
|
+
# @return [String] Gets or sets the URL to get the next set of results.
|
20
|
+
attr_accessor :next_link
|
21
|
+
|
22
|
+
#
|
23
|
+
# Validate the object. Throws ValidationError if validation fails.
|
24
|
+
#
|
25
|
+
def validate
|
26
|
+
@value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil?
|
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.value
|
39
|
+
unless serialized_property.nil?
|
40
|
+
serializedArray = []
|
41
|
+
serialized_property.each do |element|
|
42
|
+
unless element.nil?
|
43
|
+
element = DeploymentOperation.serialize_object(element)
|
44
|
+
end
|
45
|
+
serializedArray.push(element)
|
46
|
+
end
|
47
|
+
serialized_property = serializedArray
|
48
|
+
end
|
49
|
+
output_object['value'] = serialized_property unless serialized_property.nil?
|
50
|
+
|
51
|
+
serialized_property = object.next_link
|
52
|
+
output_object['nextLink'] = serialized_property unless serialized_property.nil?
|
53
|
+
|
54
|
+
output_object
|
55
|
+
end
|
56
|
+
|
57
|
+
#
|
58
|
+
# Deserializes given Ruby Hash into Model object.
|
59
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
60
|
+
# @return [DeploymentOperationsListResult] Deserialized object.
|
61
|
+
#
|
62
|
+
def self.deserialize_object(object)
|
63
|
+
return if object.nil?
|
64
|
+
output_object = DeploymentOperationsListResult.new
|
65
|
+
|
66
|
+
deserialized_property = object['value']
|
67
|
+
unless deserialized_property.nil?
|
68
|
+
deserializedArray = [];
|
69
|
+
deserialized_property.each do |element1|
|
70
|
+
unless element1.nil?
|
71
|
+
element1 = DeploymentOperation.deserialize_object(element1)
|
72
|
+
end
|
73
|
+
deserializedArray.push(element1);
|
74
|
+
end
|
75
|
+
deserialized_property = deserializedArray;
|
76
|
+
end
|
77
|
+
output_object.value = deserialized_property
|
78
|
+
|
79
|
+
deserialized_property = object['nextLink']
|
80
|
+
output_object.next_link = deserialized_property
|
81
|
+
|
82
|
+
output_object.validate
|
83
|
+
|
84
|
+
output_object
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,116 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.11.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Resources
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Deployment properties.
|
10
|
+
#
|
11
|
+
class DeploymentProperties
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return Gets or sets the template content. Use only one of Template or
|
16
|
+
# TemplateLink.
|
17
|
+
attr_accessor :template
|
18
|
+
|
19
|
+
# @return [TemplateLink] Gets or sets the URI referencing the template.
|
20
|
+
# Use only one of Template or TemplateLink.
|
21
|
+
attr_accessor :template_link
|
22
|
+
|
23
|
+
# @return Deployment parameters. Use only one of Parameters or
|
24
|
+
# ParametersLink.
|
25
|
+
attr_accessor :parameters
|
26
|
+
|
27
|
+
# @return [ParametersLink] Gets or sets the URI referencing the
|
28
|
+
# parameters. Use only one of Parameters or ParametersLink.
|
29
|
+
attr_accessor :parameters_link
|
30
|
+
|
31
|
+
# @return [DeploymentMode] Gets or sets the deployment mode. Possible
|
32
|
+
# values for this property include: 'Incremental'.
|
33
|
+
attr_accessor :mode
|
34
|
+
|
35
|
+
#
|
36
|
+
# Validate the object. Throws ValidationError if validation fails.
|
37
|
+
#
|
38
|
+
def validate
|
39
|
+
@template_link.validate unless @template_link.nil?
|
40
|
+
@parameters_link.validate unless @parameters_link.nil?
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# Serializes given Model object into Ruby Hash.
|
45
|
+
# @param object Model object to serialize.
|
46
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
47
|
+
#
|
48
|
+
def self.serialize_object(object)
|
49
|
+
object.validate
|
50
|
+
output_object = {}
|
51
|
+
|
52
|
+
serialized_property = object.template
|
53
|
+
output_object['template'] = serialized_property unless serialized_property.nil?
|
54
|
+
|
55
|
+
serialized_property = object.template_link
|
56
|
+
unless serialized_property.nil?
|
57
|
+
serialized_property = TemplateLink.serialize_object(serialized_property)
|
58
|
+
end
|
59
|
+
output_object['templateLink'] = serialized_property unless serialized_property.nil?
|
60
|
+
|
61
|
+
serialized_property = object.parameters
|
62
|
+
output_object['parameters'] = serialized_property unless serialized_property.nil?
|
63
|
+
|
64
|
+
serialized_property = object.parameters_link
|
65
|
+
unless serialized_property.nil?
|
66
|
+
serialized_property = ParametersLink.serialize_object(serialized_property)
|
67
|
+
end
|
68
|
+
output_object['parametersLink'] = serialized_property unless serialized_property.nil?
|
69
|
+
|
70
|
+
serialized_property = object.mode
|
71
|
+
output_object['mode'] = serialized_property unless serialized_property.nil?
|
72
|
+
|
73
|
+
output_object
|
74
|
+
end
|
75
|
+
|
76
|
+
#
|
77
|
+
# Deserializes given Ruby Hash into Model object.
|
78
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
79
|
+
# @return [DeploymentProperties] Deserialized object.
|
80
|
+
#
|
81
|
+
def self.deserialize_object(object)
|
82
|
+
return if object.nil?
|
83
|
+
output_object = DeploymentProperties.new
|
84
|
+
|
85
|
+
deserialized_property = object['template']
|
86
|
+
output_object.template = deserialized_property
|
87
|
+
|
88
|
+
deserialized_property = object['templateLink']
|
89
|
+
unless deserialized_property.nil?
|
90
|
+
deserialized_property = TemplateLink.deserialize_object(deserialized_property)
|
91
|
+
end
|
92
|
+
output_object.template_link = deserialized_property
|
93
|
+
|
94
|
+
deserialized_property = object['parameters']
|
95
|
+
output_object.parameters = deserialized_property
|
96
|
+
|
97
|
+
deserialized_property = object['parametersLink']
|
98
|
+
unless deserialized_property.nil?
|
99
|
+
deserialized_property = ParametersLink.deserialize_object(deserialized_property)
|
100
|
+
end
|
101
|
+
output_object.parameters_link = deserialized_property
|
102
|
+
|
103
|
+
deserialized_property = object['mode']
|
104
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
105
|
+
enum_is_valid = DeploymentMode.constants.any? { |e| DeploymentMode.const_get(e).to_s.downcase == deserialized_property.downcase }
|
106
|
+
fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid
|
107
|
+
end
|
108
|
+
output_object.mode = deserialized_property
|
109
|
+
|
110
|
+
output_object.validate
|
111
|
+
|
112
|
+
output_object
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
@@ -0,0 +1,216 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.11.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Resources
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Deployment properties with additional details.
|
10
|
+
#
|
11
|
+
class DeploymentPropertiesExtended
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets the state of the provisioning.
|
16
|
+
attr_accessor :provisioning_state
|
17
|
+
|
18
|
+
# @return [String] Gets or sets the correlation ID of the deployment.
|
19
|
+
attr_accessor :correlation_id
|
20
|
+
|
21
|
+
# @return [DateTime] Gets or sets the timestamp of the template
|
22
|
+
# deployment.
|
23
|
+
attr_accessor :timestamp
|
24
|
+
|
25
|
+
# @return Gets or sets key/value pairs that represent deploymentoutput.
|
26
|
+
attr_accessor :outputs
|
27
|
+
|
28
|
+
# @return [Array<Provider>] Gets the list of resource providers needed
|
29
|
+
# for the deployment.
|
30
|
+
attr_accessor :providers
|
31
|
+
|
32
|
+
# @return [Array<Dependency>] Gets the list of deployment dependencies.
|
33
|
+
attr_accessor :dependencies
|
34
|
+
|
35
|
+
# @return Gets or sets the template content. Use only one of Template or
|
36
|
+
# TemplateLink.
|
37
|
+
attr_accessor :template
|
38
|
+
|
39
|
+
# @return [TemplateLink] Gets or sets the URI referencing the template.
|
40
|
+
# Use only one of Template or TemplateLink.
|
41
|
+
attr_accessor :template_link
|
42
|
+
|
43
|
+
# @return Deployment parameters. Use only one of Parameters or
|
44
|
+
# ParametersLink.
|
45
|
+
attr_accessor :parameters
|
46
|
+
|
47
|
+
# @return [ParametersLink] Gets or sets the URI referencing the
|
48
|
+
# parameters. Use only one of Parameters or ParametersLink.
|
49
|
+
attr_accessor :parameters_link
|
50
|
+
|
51
|
+
# @return [DeploymentMode] Gets or sets the deployment mode. Possible
|
52
|
+
# values for this property include: 'Incremental'.
|
53
|
+
attr_accessor :mode
|
54
|
+
|
55
|
+
#
|
56
|
+
# Validate the object. Throws ValidationError if validation fails.
|
57
|
+
#
|
58
|
+
def validate
|
59
|
+
@providers.each{ |e| e.validate if e.respond_to?(:validate) } unless @providers.nil?
|
60
|
+
@dependencies.each{ |e| e.validate if e.respond_to?(:validate) } unless @dependencies.nil?
|
61
|
+
@template_link.validate unless @template_link.nil?
|
62
|
+
@parameters_link.validate unless @parameters_link.nil?
|
63
|
+
end
|
64
|
+
|
65
|
+
#
|
66
|
+
# Serializes given Model object into Ruby Hash.
|
67
|
+
# @param object Model object to serialize.
|
68
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
69
|
+
#
|
70
|
+
def self.serialize_object(object)
|
71
|
+
object.validate
|
72
|
+
output_object = {}
|
73
|
+
|
74
|
+
serialized_property = object.provisioning_state
|
75
|
+
output_object['provisioningState'] = serialized_property unless serialized_property.nil?
|
76
|
+
|
77
|
+
serialized_property = object.correlation_id
|
78
|
+
output_object['correlationId'] = serialized_property unless serialized_property.nil?
|
79
|
+
|
80
|
+
serialized_property = object.timestamp
|
81
|
+
serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ')
|
82
|
+
output_object['timestamp'] = serialized_property unless serialized_property.nil?
|
83
|
+
|
84
|
+
serialized_property = object.outputs
|
85
|
+
output_object['outputs'] = serialized_property unless serialized_property.nil?
|
86
|
+
|
87
|
+
serialized_property = object.providers
|
88
|
+
unless serialized_property.nil?
|
89
|
+
serializedArray = []
|
90
|
+
serialized_property.each do |element|
|
91
|
+
unless element.nil?
|
92
|
+
element = Provider.serialize_object(element)
|
93
|
+
end
|
94
|
+
serializedArray.push(element)
|
95
|
+
end
|
96
|
+
serialized_property = serializedArray
|
97
|
+
end
|
98
|
+
output_object['providers'] = serialized_property unless serialized_property.nil?
|
99
|
+
|
100
|
+
serialized_property = object.dependencies
|
101
|
+
unless serialized_property.nil?
|
102
|
+
serializedArray = []
|
103
|
+
serialized_property.each do |element1|
|
104
|
+
unless element1.nil?
|
105
|
+
element1 = Dependency.serialize_object(element1)
|
106
|
+
end
|
107
|
+
serializedArray.push(element1)
|
108
|
+
end
|
109
|
+
serialized_property = serializedArray
|
110
|
+
end
|
111
|
+
output_object['dependencies'] = serialized_property unless serialized_property.nil?
|
112
|
+
|
113
|
+
serialized_property = object.template
|
114
|
+
output_object['template'] = serialized_property unless serialized_property.nil?
|
115
|
+
|
116
|
+
serialized_property = object.template_link
|
117
|
+
unless serialized_property.nil?
|
118
|
+
serialized_property = TemplateLink.serialize_object(serialized_property)
|
119
|
+
end
|
120
|
+
output_object['templateLink'] = serialized_property unless serialized_property.nil?
|
121
|
+
|
122
|
+
serialized_property = object.parameters
|
123
|
+
output_object['parameters'] = serialized_property unless serialized_property.nil?
|
124
|
+
|
125
|
+
serialized_property = object.parameters_link
|
126
|
+
unless serialized_property.nil?
|
127
|
+
serialized_property = ParametersLink.serialize_object(serialized_property)
|
128
|
+
end
|
129
|
+
output_object['parametersLink'] = serialized_property unless serialized_property.nil?
|
130
|
+
|
131
|
+
serialized_property = object.mode
|
132
|
+
output_object['mode'] = serialized_property unless serialized_property.nil?
|
133
|
+
|
134
|
+
output_object
|
135
|
+
end
|
136
|
+
|
137
|
+
#
|
138
|
+
# Deserializes given Ruby Hash into Model object.
|
139
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
140
|
+
# @return [DeploymentPropertiesExtended] Deserialized object.
|
141
|
+
#
|
142
|
+
def self.deserialize_object(object)
|
143
|
+
return if object.nil?
|
144
|
+
output_object = DeploymentPropertiesExtended.new
|
145
|
+
|
146
|
+
deserialized_property = object['provisioningState']
|
147
|
+
output_object.provisioning_state = deserialized_property
|
148
|
+
|
149
|
+
deserialized_property = object['correlationId']
|
150
|
+
output_object.correlation_id = deserialized_property
|
151
|
+
|
152
|
+
deserialized_property = object['timestamp']
|
153
|
+
deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty?
|
154
|
+
output_object.timestamp = deserialized_property
|
155
|
+
|
156
|
+
deserialized_property = object['outputs']
|
157
|
+
output_object.outputs = deserialized_property
|
158
|
+
|
159
|
+
deserialized_property = object['providers']
|
160
|
+
unless deserialized_property.nil?
|
161
|
+
deserializedArray = [];
|
162
|
+
deserialized_property.each do |element2|
|
163
|
+
unless element2.nil?
|
164
|
+
element2 = Provider.deserialize_object(element2)
|
165
|
+
end
|
166
|
+
deserializedArray.push(element2);
|
167
|
+
end
|
168
|
+
deserialized_property = deserializedArray;
|
169
|
+
end
|
170
|
+
output_object.providers = deserialized_property
|
171
|
+
|
172
|
+
deserialized_property = object['dependencies']
|
173
|
+
unless deserialized_property.nil?
|
174
|
+
deserializedArray = [];
|
175
|
+
deserialized_property.each do |element3|
|
176
|
+
unless element3.nil?
|
177
|
+
element3 = Dependency.deserialize_object(element3)
|
178
|
+
end
|
179
|
+
deserializedArray.push(element3);
|
180
|
+
end
|
181
|
+
deserialized_property = deserializedArray;
|
182
|
+
end
|
183
|
+
output_object.dependencies = deserialized_property
|
184
|
+
|
185
|
+
deserialized_property = object['template']
|
186
|
+
output_object.template = deserialized_property
|
187
|
+
|
188
|
+
deserialized_property = object['templateLink']
|
189
|
+
unless deserialized_property.nil?
|
190
|
+
deserialized_property = TemplateLink.deserialize_object(deserialized_property)
|
191
|
+
end
|
192
|
+
output_object.template_link = deserialized_property
|
193
|
+
|
194
|
+
deserialized_property = object['parameters']
|
195
|
+
output_object.parameters = deserialized_property
|
196
|
+
|
197
|
+
deserialized_property = object['parametersLink']
|
198
|
+
unless deserialized_property.nil?
|
199
|
+
deserialized_property = ParametersLink.deserialize_object(deserialized_property)
|
200
|
+
end
|
201
|
+
output_object.parameters_link = deserialized_property
|
202
|
+
|
203
|
+
deserialized_property = object['mode']
|
204
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
205
|
+
enum_is_valid = DeploymentMode.constants.any? { |e| DeploymentMode.const_get(e).to_s.downcase == deserialized_property.downcase }
|
206
|
+
fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid
|
207
|
+
end
|
208
|
+
output_object.mode = deserialized_property
|
209
|
+
|
210
|
+
output_object.validate
|
211
|
+
|
212
|
+
output_object
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
216
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.11.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::Resources
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Information from validate template deployment response.
|
10
|
+
#
|
11
|
+
class DeploymentValidateResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [ResourceManagementErrorWithDetails] Gets or sets validation
|
16
|
+
# error.
|
17
|
+
attr_accessor :error
|
18
|
+
|
19
|
+
# @return [DeploymentPropertiesExtended] Gets or sets the template
|
20
|
+
# deployment properties.
|
21
|
+
attr_accessor :properties
|
22
|
+
|
23
|
+
#
|
24
|
+
# Validate the object. Throws ValidationError if validation fails.
|
25
|
+
#
|
26
|
+
def validate
|
27
|
+
@error.validate unless @error.nil?
|
28
|
+
@properties.validate unless @properties.nil?
|
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.error
|
41
|
+
unless serialized_property.nil?
|
42
|
+
serialized_property = ResourceManagementErrorWithDetails.serialize_object(serialized_property)
|
43
|
+
end
|
44
|
+
output_object['error'] = serialized_property unless serialized_property.nil?
|
45
|
+
|
46
|
+
serialized_property = object.properties
|
47
|
+
unless serialized_property.nil?
|
48
|
+
serialized_property = DeploymentPropertiesExtended.serialize_object(serialized_property)
|
49
|
+
end
|
50
|
+
output_object['properties'] = serialized_property unless serialized_property.nil?
|
51
|
+
|
52
|
+
output_object
|
53
|
+
end
|
54
|
+
|
55
|
+
#
|
56
|
+
# Deserializes given Ruby Hash into Model object.
|
57
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
58
|
+
# @return [DeploymentValidateResult] Deserialized object.
|
59
|
+
#
|
60
|
+
def self.deserialize_object(object)
|
61
|
+
return if object.nil?
|
62
|
+
output_object = DeploymentValidateResult.new
|
63
|
+
|
64
|
+
deserialized_property = object['error']
|
65
|
+
unless deserialized_property.nil?
|
66
|
+
deserialized_property = ResourceManagementErrorWithDetails.deserialize_object(deserialized_property)
|
67
|
+
end
|
68
|
+
output_object.error = deserialized_property
|
69
|
+
|
70
|
+
deserialized_property = object['properties']
|
71
|
+
unless deserialized_property.nil?
|
72
|
+
deserialized_property = DeploymentPropertiesExtended.deserialize_object(deserialized_property)
|
73
|
+
end
|
74
|
+
output_object.properties = deserialized_property
|
75
|
+
|
76
|
+
output_object.validate
|
77
|
+
|
78
|
+
output_object
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|