azure_mgmt_cdn 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_cdn.gemspec +34 -0
- data/lib/azure_mgmt_cdn.rb +77 -0
- data/lib/azure_mgmt_cdn/cdn_management_client.rb +87 -0
- data/lib/azure_mgmt_cdn/custom_domains.rb +482 -0
- data/lib/azure_mgmt_cdn/endpoints.rb +940 -0
- data/lib/azure_mgmt_cdn/models/check_name_availability_input.rb +66 -0
- data/lib/azure_mgmt_cdn/models/check_name_availability_output.rb +75 -0
- data/lib/azure_mgmt_cdn/models/custom_domain.rb +82 -0
- data/lib/azure_mgmt_cdn/models/custom_domain_list_result.rb +77 -0
- data/lib/azure_mgmt_cdn/models/custom_domain_parameters.rb +62 -0
- data/lib/azure_mgmt_cdn/models/custom_domain_properties.rb +84 -0
- data/lib/azure_mgmt_cdn/models/custom_domain_properties_parameters.rb +56 -0
- data/lib/azure_mgmt_cdn/models/custom_domain_resource_state.rb +17 -0
- data/lib/azure_mgmt_cdn/models/deep_created_origin.rb +72 -0
- data/lib/azure_mgmt_cdn/models/deep_created_origin_properties.rb +78 -0
- data/lib/azure_mgmt_cdn/models/endpoint.rb +95 -0
- data/lib/azure_mgmt_cdn/models/endpoint_create_parameters.rb +82 -0
- data/lib/azure_mgmt_cdn/models/endpoint_list_result.rb +76 -0
- data/lib/azure_mgmt_cdn/models/endpoint_properties.rb +197 -0
- data/lib/azure_mgmt_cdn/models/endpoint_properties_create_parameters.rb +160 -0
- data/lib/azure_mgmt_cdn/models/endpoint_properties_update_parameters.rb +127 -0
- data/lib/azure_mgmt_cdn/models/endpoint_resource_state.rb +20 -0
- data/lib/azure_mgmt_cdn/models/endpoint_update_parameters.rb +72 -0
- data/lib/azure_mgmt_cdn/models/error_response.rb +65 -0
- data/lib/azure_mgmt_cdn/models/load_parameters.rb +58 -0
- data/lib/azure_mgmt_cdn/models/operation.rb +71 -0
- data/lib/azure_mgmt_cdn/models/operation_display.rb +75 -0
- data/lib/azure_mgmt_cdn/models/operation_list_result.rb +77 -0
- data/lib/azure_mgmt_cdn/models/origin.rb +83 -0
- data/lib/azure_mgmt_cdn/models/origin_list_result.rb +76 -0
- data/lib/azure_mgmt_cdn/models/origin_parameters.rb +62 -0
- data/lib/azure_mgmt_cdn/models/origin_properties.rb +106 -0
- data/lib/azure_mgmt_cdn/models/origin_properties_parameters.rb +78 -0
- data/lib/azure_mgmt_cdn/models/origin_resource_state.rb +17 -0
- data/lib/azure_mgmt_cdn/models/profile.rb +95 -0
- data/lib/azure_mgmt_cdn/models/profile_create_parameters.rb +82 -0
- data/lib/azure_mgmt_cdn/models/profile_list_result.rb +76 -0
- data/lib/azure_mgmt_cdn/models/profile_properties.rb +90 -0
- data/lib/azure_mgmt_cdn/models/profile_properties_create_parameters.rb +63 -0
- data/lib/azure_mgmt_cdn/models/profile_resource_state.rb +18 -0
- data/lib/azure_mgmt_cdn/models/profile_update_parameters.rb +57 -0
- data/lib/azure_mgmt_cdn/models/provisioning_state.rb +17 -0
- data/lib/azure_mgmt_cdn/models/purge_parameters.rb +58 -0
- data/lib/azure_mgmt_cdn/models/query_string_caching_behavior.rb +18 -0
- data/lib/azure_mgmt_cdn/models/sku.rb +60 -0
- data/lib/azure_mgmt_cdn/models/sku_name.rb +16 -0
- data/lib/azure_mgmt_cdn/models/sso_uri.rb +56 -0
- data/lib/azure_mgmt_cdn/models/tracked_resource.rb +85 -0
- data/lib/azure_mgmt_cdn/models/validate_custom_domain_input.rb +56 -0
- data/lib/azure_mgmt_cdn/models/validate_custom_domain_output.rb +75 -0
- data/lib/azure_mgmt_cdn/module_definition.rb +8 -0
- data/lib/azure_mgmt_cdn/name_availability.rb +101 -0
- data/lib/azure_mgmt_cdn/operations.rb +87 -0
- data/lib/azure_mgmt_cdn/origins.rb +533 -0
- data/lib/azure_mgmt_cdn/profiles.rb +607 -0
- data/lib/azure_mgmt_cdn/version.rb +8 -0
- metadata +172 -0
@@ -0,0 +1,76 @@
|
|
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::CDN
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Model object.
|
10
|
+
#
|
11
|
+
class OriginListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<Origin>] List of CDN origins within an endpoint
|
16
|
+
attr_accessor :value
|
17
|
+
|
18
|
+
#
|
19
|
+
# Validate the object. Throws ValidationError if validation fails.
|
20
|
+
#
|
21
|
+
def validate
|
22
|
+
@value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil?
|
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.value
|
35
|
+
unless serialized_property.nil?
|
36
|
+
serializedArray = []
|
37
|
+
serialized_property.each do |element|
|
38
|
+
unless element.nil?
|
39
|
+
element = Origin.serialize_object(element)
|
40
|
+
end
|
41
|
+
serializedArray.push(element)
|
42
|
+
end
|
43
|
+
serialized_property = serializedArray
|
44
|
+
end
|
45
|
+
output_object['value'] = serialized_property unless serialized_property.nil?
|
46
|
+
|
47
|
+
output_object
|
48
|
+
end
|
49
|
+
|
50
|
+
#
|
51
|
+
# Deserializes given Ruby Hash into Model object.
|
52
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
53
|
+
# @return [OriginListResult] Deserialized object.
|
54
|
+
#
|
55
|
+
def self.deserialize_object(object)
|
56
|
+
return if object.nil?
|
57
|
+
output_object = OriginListResult.new
|
58
|
+
|
59
|
+
deserialized_property = object['value']
|
60
|
+
unless deserialized_property.nil?
|
61
|
+
deserialized_array = []
|
62
|
+
deserialized_property.each do |element1|
|
63
|
+
unless element1.nil?
|
64
|
+
element1 = Origin.deserialize_object(element1)
|
65
|
+
end
|
66
|
+
deserialized_array.push(element1)
|
67
|
+
end
|
68
|
+
deserialized_property = deserialized_array
|
69
|
+
end
|
70
|
+
output_object.value = deserialized_property
|
71
|
+
|
72
|
+
output_object
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,62 @@
|
|
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::CDN
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Origin properties needed for origin creation or update
|
10
|
+
#
|
11
|
+
class OriginParameters
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [OriginPropertiesParameters]
|
16
|
+
attr_accessor :properties
|
17
|
+
|
18
|
+
#
|
19
|
+
# Validate the object. Throws ValidationError if validation fails.
|
20
|
+
#
|
21
|
+
def validate
|
22
|
+
@properties.validate unless @properties.nil?
|
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.properties
|
35
|
+
unless serialized_property.nil?
|
36
|
+
serialized_property = OriginPropertiesParameters.serialize_object(serialized_property)
|
37
|
+
end
|
38
|
+
output_object['properties'] = serialized_property unless serialized_property.nil?
|
39
|
+
|
40
|
+
output_object
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# Deserializes given Ruby Hash into Model object.
|
45
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
46
|
+
# @return [OriginParameters] Deserialized object.
|
47
|
+
#
|
48
|
+
def self.deserialize_object(object)
|
49
|
+
return if object.nil?
|
50
|
+
output_object = OriginParameters.new
|
51
|
+
|
52
|
+
deserialized_property = object['properties']
|
53
|
+
unless deserialized_property.nil?
|
54
|
+
deserialized_property = OriginPropertiesParameters.deserialize_object(deserialized_property)
|
55
|
+
end
|
56
|
+
output_object.properties = deserialized_property
|
57
|
+
|
58
|
+
output_object
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,106 @@
|
|
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::CDN
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Model object.
|
10
|
+
#
|
11
|
+
class OriginProperties
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The host name of the origin
|
16
|
+
attr_accessor :host_name
|
17
|
+
|
18
|
+
# @return [Integer] The value of the http port, must be between 1 and
|
19
|
+
# 65535
|
20
|
+
attr_accessor :http_port
|
21
|
+
|
22
|
+
# @return [Integer] The value of the https port, must be between 1 and
|
23
|
+
# 65535
|
24
|
+
attr_accessor :https_port
|
25
|
+
|
26
|
+
# @return [OriginResourceState] Resource status of the origin. Possible
|
27
|
+
# values include: 'Creating', 'Active', 'Deleting'
|
28
|
+
attr_accessor :resource_state
|
29
|
+
|
30
|
+
# @return [ProvisioningState] Provisioning status of the origin.
|
31
|
+
# Possible values include: 'Creating', 'Succeeded', 'Failed'
|
32
|
+
attr_accessor :provisioning_state
|
33
|
+
|
34
|
+
#
|
35
|
+
# Validate the object. Throws ValidationError if validation fails.
|
36
|
+
#
|
37
|
+
def validate
|
38
|
+
fail MsRest::ValidationError, 'property host_name is nil' if @host_name.nil?
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Serializes given Model object into Ruby Hash.
|
43
|
+
# @param object Model object to serialize.
|
44
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
45
|
+
#
|
46
|
+
def self.serialize_object(object)
|
47
|
+
object.validate
|
48
|
+
output_object = {}
|
49
|
+
|
50
|
+
serialized_property = object.host_name
|
51
|
+
output_object['hostName'] = serialized_property unless serialized_property.nil?
|
52
|
+
|
53
|
+
serialized_property = object.http_port
|
54
|
+
output_object['httpPort'] = serialized_property unless serialized_property.nil?
|
55
|
+
|
56
|
+
serialized_property = object.https_port
|
57
|
+
output_object['httpsPort'] = serialized_property unless serialized_property.nil?
|
58
|
+
|
59
|
+
serialized_property = object.resource_state
|
60
|
+
output_object['resourceState'] = serialized_property unless serialized_property.nil?
|
61
|
+
|
62
|
+
serialized_property = object.provisioning_state
|
63
|
+
output_object['provisioningState'] = 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 [OriginProperties] Deserialized object.
|
72
|
+
#
|
73
|
+
def self.deserialize_object(object)
|
74
|
+
return if object.nil?
|
75
|
+
output_object = OriginProperties.new
|
76
|
+
|
77
|
+
deserialized_property = object['hostName']
|
78
|
+
output_object.host_name = deserialized_property
|
79
|
+
|
80
|
+
deserialized_property = object['httpPort']
|
81
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
82
|
+
output_object.http_port = deserialized_property
|
83
|
+
|
84
|
+
deserialized_property = object['httpsPort']
|
85
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
86
|
+
output_object.https_port = deserialized_property
|
87
|
+
|
88
|
+
deserialized_property = object['resourceState']
|
89
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
90
|
+
enum_is_valid = OriginResourceState.constants.any? { |e| OriginResourceState.const_get(e).to_s.downcase == deserialized_property.downcase }
|
91
|
+
warn 'Enum OriginResourceState does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
92
|
+
end
|
93
|
+
output_object.resource_state = deserialized_property
|
94
|
+
|
95
|
+
deserialized_property = object['provisioningState']
|
96
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
97
|
+
enum_is_valid = ProvisioningState.constants.any? { |e| ProvisioningState.const_get(e).to_s.downcase == deserialized_property.downcase }
|
98
|
+
warn 'Enum ProvisioningState does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
99
|
+
end
|
100
|
+
output_object.provisioning_state = deserialized_property
|
101
|
+
|
102
|
+
output_object
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
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::CDN
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Model object.
|
10
|
+
#
|
11
|
+
class OriginPropertiesParameters
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The host name of the origin
|
16
|
+
attr_accessor :host_name
|
17
|
+
|
18
|
+
# @return [Integer] The value of the http port, must be between 1 and
|
19
|
+
# 65535
|
20
|
+
attr_accessor :http_port
|
21
|
+
|
22
|
+
# @return [Integer] The value of the https port, must be between 1 and
|
23
|
+
# 65535
|
24
|
+
attr_accessor :https_port
|
25
|
+
|
26
|
+
#
|
27
|
+
# Validate the object. Throws ValidationError if validation fails.
|
28
|
+
#
|
29
|
+
def validate
|
30
|
+
fail MsRest::ValidationError, 'property host_name is nil' if @host_name.nil?
|
31
|
+
end
|
32
|
+
|
33
|
+
#
|
34
|
+
# Serializes given Model object into Ruby Hash.
|
35
|
+
# @param object Model object to serialize.
|
36
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
37
|
+
#
|
38
|
+
def self.serialize_object(object)
|
39
|
+
object.validate
|
40
|
+
output_object = {}
|
41
|
+
|
42
|
+
serialized_property = object.host_name
|
43
|
+
output_object['hostName'] = serialized_property unless serialized_property.nil?
|
44
|
+
|
45
|
+
serialized_property = object.http_port
|
46
|
+
output_object['httpPort'] = serialized_property unless serialized_property.nil?
|
47
|
+
|
48
|
+
serialized_property = object.https_port
|
49
|
+
output_object['httpsPort'] = serialized_property unless serialized_property.nil?
|
50
|
+
|
51
|
+
output_object
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# Deserializes given Ruby Hash into Model object.
|
56
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
57
|
+
# @return [OriginPropertiesParameters] Deserialized object.
|
58
|
+
#
|
59
|
+
def self.deserialize_object(object)
|
60
|
+
return if object.nil?
|
61
|
+
output_object = OriginPropertiesParameters.new
|
62
|
+
|
63
|
+
deserialized_property = object['hostName']
|
64
|
+
output_object.host_name = deserialized_property
|
65
|
+
|
66
|
+
deserialized_property = object['httpPort']
|
67
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
68
|
+
output_object.http_port = deserialized_property
|
69
|
+
|
70
|
+
deserialized_property = object['httpsPort']
|
71
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
72
|
+
output_object.https_port = deserialized_property
|
73
|
+
|
74
|
+
output_object
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,17 @@
|
|
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::CDN
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for OriginResourceState
|
10
|
+
#
|
11
|
+
module OriginResourceState
|
12
|
+
Creating = "Creating"
|
13
|
+
Active = "Active"
|
14
|
+
Deleting = "Deleting"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,95 @@
|
|
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::CDN
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# CDN profile represents the top level resource and the entry point into
|
10
|
+
# the CDN API. This allows users to set up a logical grouping of
|
11
|
+
# endpoints in addition to creating shared configuration settings and
|
12
|
+
# selecting pricing tiers and providers.
|
13
|
+
#
|
14
|
+
class Profile < TrackedResource
|
15
|
+
|
16
|
+
include MsRestAzure
|
17
|
+
|
18
|
+
# @return [ProfileProperties]
|
19
|
+
attr_accessor :properties
|
20
|
+
|
21
|
+
#
|
22
|
+
# Validate the object. Throws ValidationError if validation fails.
|
23
|
+
#
|
24
|
+
def validate
|
25
|
+
@properties.validate unless @properties.nil?
|
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.location
|
38
|
+
output_object['location'] = serialized_property unless serialized_property.nil?
|
39
|
+
|
40
|
+
serialized_property = object.tags
|
41
|
+
output_object['tags'] = serialized_property unless serialized_property.nil?
|
42
|
+
|
43
|
+
serialized_property = object.id
|
44
|
+
output_object['id'] = serialized_property unless serialized_property.nil?
|
45
|
+
|
46
|
+
serialized_property = object.name
|
47
|
+
output_object['name'] = serialized_property unless serialized_property.nil?
|
48
|
+
|
49
|
+
serialized_property = object.type
|
50
|
+
output_object['type'] = serialized_property unless serialized_property.nil?
|
51
|
+
|
52
|
+
serialized_property = object.properties
|
53
|
+
unless serialized_property.nil?
|
54
|
+
serialized_property = ProfileProperties.serialize_object(serialized_property)
|
55
|
+
end
|
56
|
+
output_object['properties'] = 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 [Profile] Deserialized object.
|
65
|
+
#
|
66
|
+
def self.deserialize_object(object)
|
67
|
+
return if object.nil?
|
68
|
+
output_object = Profile.new
|
69
|
+
|
70
|
+
deserialized_property = object['location']
|
71
|
+
output_object.location = deserialized_property
|
72
|
+
|
73
|
+
deserialized_property = object['tags']
|
74
|
+
output_object.tags = deserialized_property
|
75
|
+
|
76
|
+
deserialized_property = object['id']
|
77
|
+
output_object.id = deserialized_property
|
78
|
+
|
79
|
+
deserialized_property = object['name']
|
80
|
+
output_object.name = deserialized_property
|
81
|
+
|
82
|
+
deserialized_property = object['type']
|
83
|
+
output_object.type = deserialized_property
|
84
|
+
|
85
|
+
deserialized_property = object['properties']
|
86
|
+
unless deserialized_property.nil?
|
87
|
+
deserialized_property = ProfileProperties.deserialize_object(deserialized_property)
|
88
|
+
end
|
89
|
+
output_object.properties = deserialized_property
|
90
|
+
|
91
|
+
output_object
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,82 @@
|
|
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::CDN
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Profile properties required for profile creation
|
10
|
+
#
|
11
|
+
class ProfileCreateParameters
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Profile location
|
16
|
+
attr_accessor :location
|
17
|
+
|
18
|
+
# @return [Hash{String => String}] Profile tags
|
19
|
+
attr_accessor :tags
|
20
|
+
|
21
|
+
# @return [ProfilePropertiesCreateParameters]
|
22
|
+
attr_accessor :properties
|
23
|
+
|
24
|
+
#
|
25
|
+
# Validate the object. Throws ValidationError if validation fails.
|
26
|
+
#
|
27
|
+
def validate
|
28
|
+
fail MsRest::ValidationError, 'property location is nil' if @location.nil?
|
29
|
+
@tags.each{ |e| e.validate if e.respond_to?(:validate) } unless @tags.nil?
|
30
|
+
@properties.validate unless @properties.nil?
|
31
|
+
end
|
32
|
+
|
33
|
+
#
|
34
|
+
# Serializes given Model object into Ruby Hash.
|
35
|
+
# @param object Model object to serialize.
|
36
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
37
|
+
#
|
38
|
+
def self.serialize_object(object)
|
39
|
+
object.validate
|
40
|
+
output_object = {}
|
41
|
+
|
42
|
+
serialized_property = object.location
|
43
|
+
output_object['location'] = serialized_property unless serialized_property.nil?
|
44
|
+
|
45
|
+
serialized_property = object.tags
|
46
|
+
output_object['tags'] = serialized_property unless serialized_property.nil?
|
47
|
+
|
48
|
+
serialized_property = object.properties
|
49
|
+
unless serialized_property.nil?
|
50
|
+
serialized_property = ProfilePropertiesCreateParameters.serialize_object(serialized_property)
|
51
|
+
end
|
52
|
+
output_object['properties'] = 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 [ProfileCreateParameters] Deserialized object.
|
61
|
+
#
|
62
|
+
def self.deserialize_object(object)
|
63
|
+
return if object.nil?
|
64
|
+
output_object = ProfileCreateParameters.new
|
65
|
+
|
66
|
+
deserialized_property = object['location']
|
67
|
+
output_object.location = deserialized_property
|
68
|
+
|
69
|
+
deserialized_property = object['tags']
|
70
|
+
output_object.tags = deserialized_property
|
71
|
+
|
72
|
+
deserialized_property = object['properties']
|
73
|
+
unless deserialized_property.nil?
|
74
|
+
deserialized_property = ProfilePropertiesCreateParameters.deserialize_object(deserialized_property)
|
75
|
+
end
|
76
|
+
output_object.properties = deserialized_property
|
77
|
+
|
78
|
+
output_object
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|