azure_mgmt_network 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 +15 -0
- data/LICENSE.txt +21 -0
- data/README.md +131 -0
- data/Rakefile +5 -0
- data/azure_mgmt_network.gemspec +39 -0
- data/lib/azure_mgmt_network.rb +139 -0
- data/lib/azure_mgmt_network/Models/address_space.rb +60 -0
- data/lib/azure_mgmt_network/Models/application_gateway.rb +104 -0
- data/lib/azure_mgmt_network/Models/application_gateway_backend_address.rb +67 -0
- data/lib/azure_mgmt_network/Models/application_gateway_backend_address_pool.rb +90 -0
- data/lib/azure_mgmt_network/Models/application_gateway_backend_address_pool_properties_format.rb +121 -0
- data/lib/azure_mgmt_network/Models/application_gateway_backend_http_settings.rb +90 -0
- data/lib/azure_mgmt_network/Models/application_gateway_backend_http_settings_properties_format.rb +98 -0
- data/lib/azure_mgmt_network/Models/application_gateway_cookie_based_affinity.rb +16 -0
- data/lib/azure_mgmt_network/Models/application_gateway_frontend_ip_configuration.rb +91 -0
- data/lib/azure_mgmt_network/Models/application_gateway_frontend_ip_configuration_properties_format.rb +117 -0
- data/lib/azure_mgmt_network/Models/application_gateway_frontend_port.rb +90 -0
- data/lib/azure_mgmt_network/Models/application_gateway_frontend_port_properties_format.rb +70 -0
- data/lib/azure_mgmt_network/Models/application_gateway_http_listener.rb +90 -0
- data/lib/azure_mgmt_network/Models/application_gateway_http_listener_properties_format.rb +124 -0
- data/lib/azure_mgmt_network/Models/application_gateway_ip_configuration.rb +90 -0
- data/lib/azure_mgmt_network/Models/application_gateway_ip_configuration_properties_format.rb +77 -0
- data/lib/azure_mgmt_network/Models/application_gateway_list_result.rb +88 -0
- data/lib/azure_mgmt_network/Models/application_gateway_operational_state.rb +18 -0
- data/lib/azure_mgmt_network/Models/application_gateway_properties_format.rb +338 -0
- data/lib/azure_mgmt_network/Models/application_gateway_protocol.rb +16 -0
- data/lib/azure_mgmt_network/Models/application_gateway_request_routing_rule.rb +90 -0
- data/lib/azure_mgmt_network/Models/application_gateway_request_routing_rule_properties_format.rb +124 -0
- data/lib/azure_mgmt_network/Models/application_gateway_request_routing_rule_type.rb +15 -0
- data/lib/azure_mgmt_network/Models/application_gateway_sku.rb +88 -0
- data/lib/azure_mgmt_network/Models/application_gateway_sku_name.rb +17 -0
- data/lib/azure_mgmt_network/Models/application_gateway_ssl_certificate.rb +90 -0
- data/lib/azure_mgmt_network/Models/application_gateway_ssl_certificate_properties_format.rb +87 -0
- data/lib/azure_mgmt_network/Models/application_gateway_tier.rb +15 -0
- data/lib/azure_mgmt_network/Models/azure_async_operation_result.rb +85 -0
- data/lib/azure_mgmt_network/Models/backend_address_pool.rb +90 -0
- data/lib/azure_mgmt_network/Models/backend_address_pool_properties_format.rb +120 -0
- data/lib/azure_mgmt_network/Models/connection_reset_shared_key.rb +64 -0
- data/lib/azure_mgmt_network/Models/connection_reset_shared_key_properties_format.rb +60 -0
- data/lib/azure_mgmt_network/Models/connection_shared_key.rb +58 -0
- data/lib/azure_mgmt_network/Models/dhcp_options.rb +60 -0
- data/lib/azure_mgmt_network/Models/dns_name_availability_result.rb +58 -0
- data/lib/azure_mgmt_network/Models/error.rb +114 -0
- data/lib/azure_mgmt_network/Models/error_details.rb +76 -0
- data/lib/azure_mgmt_network/Models/frontend_ip_configuration.rb +90 -0
- data/lib/azure_mgmt_network/Models/frontend_ip_configuration_properties_format.rb +181 -0
- data/lib/azure_mgmt_network/Models/inbound_nat_rule.rb +90 -0
- data/lib/azure_mgmt_network/Models/inbound_nat_rule_properties_format.rb +163 -0
- data/lib/azure_mgmt_network/Models/ip_allocation_method.rb +16 -0
- data/lib/azure_mgmt_network/Models/load_balancer.rb +104 -0
- data/lib/azure_mgmt_network/Models/load_balancer_list_result.rb +88 -0
- data/lib/azure_mgmt_network/Models/load_balancer_properties_format.rb +210 -0
- data/lib/azure_mgmt_network/Models/load_balancing_rule.rb +90 -0
- data/lib/azure_mgmt_network/Models/load_balancing_rule_properties_format.rb +195 -0
- data/lib/azure_mgmt_network/Models/load_distribution.rb +17 -0
- data/lib/azure_mgmt_network/Models/local_network_gateway.rb +104 -0
- data/lib/azure_mgmt_network/Models/local_network_gateway_list_result.rb +88 -0
- data/lib/azure_mgmt_network/Models/local_network_gateway_properties_format.rb +83 -0
- data/lib/azure_mgmt_network/Models/network_interface.rb +104 -0
- data/lib/azure_mgmt_network/Models/network_interface_dns_settings.rb +89 -0
- data/lib/azure_mgmt_network/Models/network_interface_ip_configuration.rb +90 -0
- data/lib/azure_mgmt_network/Models/network_interface_ip_configuration_properties_format.rb +179 -0
- data/lib/azure_mgmt_network/Models/network_interface_list_result.rb +88 -0
- data/lib/azure_mgmt_network/Models/network_interface_properties_format.rb +158 -0
- data/lib/azure_mgmt_network/Models/network_security_group.rb +104 -0
- data/lib/azure_mgmt_network/Models/network_security_group_list_result.rb +88 -0
- data/lib/azure_mgmt_network/Models/network_security_group_properties_format.rb +181 -0
- data/lib/azure_mgmt_network/Models/operation_status.rb +17 -0
- data/lib/azure_mgmt_network/Models/probe.rb +90 -0
- data/lib/azure_mgmt_network/Models/probe_properties_format.rb +157 -0
- data/lib/azure_mgmt_network/Models/probe_protocol.rb +16 -0
- data/lib/azure_mgmt_network/Models/public_ip_address.rb +104 -0
- data/lib/azure_mgmt_network/Models/public_ip_address_dns_settings.rb +85 -0
- data/lib/azure_mgmt_network/Models/public_ip_address_list_result.rb +88 -0
- data/lib/azure_mgmt_network/Models/public_ip_address_properties_format.rb +126 -0
- data/lib/azure_mgmt_network/Models/security_rule.rb +90 -0
- data/lib/azure_mgmt_network/Models/security_rule_access.rb +16 -0
- data/lib/azure_mgmt_network/Models/security_rule_direction.rb +16 -0
- data/lib/azure_mgmt_network/Models/security_rule_list_result.rb +89 -0
- data/lib/azure_mgmt_network/Models/security_rule_properties_format.rb +174 -0
- data/lib/azure_mgmt_network/Models/security_rule_protocol.rb +17 -0
- data/lib/azure_mgmt_network/Models/subnet.rb +90 -0
- data/lib/azure_mgmt_network/Models/subnet_list_result.rb +88 -0
- data/lib/azure_mgmt_network/Models/subnet_properties_format.rb +115 -0
- data/lib/azure_mgmt_network/Models/transport_protocol.rb +16 -0
- data/lib/azure_mgmt_network/Models/usage.rb +98 -0
- data/lib/azure_mgmt_network/Models/usage_name.rb +68 -0
- data/lib/azure_mgmt_network/Models/usage_unit.rb +15 -0
- data/lib/azure_mgmt_network/Models/usages_list_result.rb +78 -0
- data/lib/azure_mgmt_network/Models/virtual_network.rb +104 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway.rb +104 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway_connection.rb +104 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway_connection_list_result.rb +89 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway_connection_properties_format.rb +141 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway_connection_type.rb +18 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway_ip_configuration.rb +90 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway_ip_configuration_properties_format.rb +117 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway_list_result.rb +88 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway_properties_format.rb +126 -0
- data/lib/azure_mgmt_network/Models/virtual_network_gateway_type.rb +15 -0
- data/lib/azure_mgmt_network/Models/virtual_network_list_result.rb +88 -0
- data/lib/azure_mgmt_network/Models/virtual_network_properties_format.rb +123 -0
- data/lib/azure_mgmt_network/Models/vpn_type.rb +16 -0
- data/lib/azure_mgmt_network/application_gateways.rb +915 -0
- data/lib/azure_mgmt_network/load_balancers.rb +709 -0
- data/lib/azure_mgmt_network/local_network_gateways.rb +550 -0
- data/lib/azure_mgmt_network/module_definition.rb +6 -0
- data/lib/azure_mgmt_network/network_interfaces.rb +709 -0
- data/lib/azure_mgmt_network/network_resource_provider_client.rb +195 -0
- data/lib/azure_mgmt_network/network_security_groups.rb +718 -0
- data/lib/azure_mgmt_network/public_ip_addresses.rb +711 -0
- data/lib/azure_mgmt_network/security_rules.rb +563 -0
- data/lib/azure_mgmt_network/subnets.rb +552 -0
- data/lib/azure_mgmt_network/usages.rb +113 -0
- data/lib/azure_mgmt_network/version.rb +6 -0
- data/lib/azure_mgmt_network/virtual_network_gateway_connections.rb +945 -0
- data/lib/azure_mgmt_network/virtual_network_gateways.rb +686 -0
- data/lib/azure_mgmt_network/virtual_networks.rb +707 -0
- metadata +311 -0
@@ -0,0 +1,17 @@
|
|
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::Network
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for SecurityRuleProtocol
|
10
|
+
#
|
11
|
+
module SecurityRuleProtocol
|
12
|
+
Tcp = "Tcp"
|
13
|
+
Udp = "Udp"
|
14
|
+
Asterisk = "*"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,90 @@
|
|
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::Network
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Subnet in a VirtualNework resource
|
10
|
+
#
|
11
|
+
class Subnet < MsRestAzure::SubResource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [SubnetPropertiesFormat]
|
16
|
+
attr_accessor :properties
|
17
|
+
|
18
|
+
# @return [String] Gets name of the resource that is unique within a
|
19
|
+
# resource group. This name can be used to access the resource
|
20
|
+
attr_accessor :name
|
21
|
+
|
22
|
+
# @return [String] A unique read-only string that changes whenever the
|
23
|
+
# resource is updated
|
24
|
+
attr_accessor :etag
|
25
|
+
|
26
|
+
#
|
27
|
+
# Validate the object. Throws ValidationError if validation fails.
|
28
|
+
#
|
29
|
+
def validate
|
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.id
|
43
|
+
output_object['id'] = serialized_property unless serialized_property.nil?
|
44
|
+
|
45
|
+
serialized_property = object.properties
|
46
|
+
unless serialized_property.nil?
|
47
|
+
serialized_property = SubnetPropertiesFormat.serialize_object(serialized_property)
|
48
|
+
end
|
49
|
+
output_object['properties'] = serialized_property unless serialized_property.nil?
|
50
|
+
|
51
|
+
serialized_property = object.name
|
52
|
+
output_object['name'] = serialized_property unless serialized_property.nil?
|
53
|
+
|
54
|
+
serialized_property = object.etag
|
55
|
+
output_object['etag'] = serialized_property unless serialized_property.nil?
|
56
|
+
|
57
|
+
output_object
|
58
|
+
end
|
59
|
+
|
60
|
+
#
|
61
|
+
# Deserializes given Ruby Hash into Model object.
|
62
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
63
|
+
# @return [Subnet] Deserialized object.
|
64
|
+
#
|
65
|
+
def self.deserialize_object(object)
|
66
|
+
return if object.nil?
|
67
|
+
output_object = Subnet.new
|
68
|
+
|
69
|
+
deserialized_property = object['id']
|
70
|
+
output_object.id = deserialized_property
|
71
|
+
|
72
|
+
deserialized_property = object['properties']
|
73
|
+
unless deserialized_property.nil?
|
74
|
+
deserialized_property = SubnetPropertiesFormat.deserialize_object(deserialized_property)
|
75
|
+
end
|
76
|
+
output_object.properties = deserialized_property
|
77
|
+
|
78
|
+
deserialized_property = object['name']
|
79
|
+
output_object.name = deserialized_property
|
80
|
+
|
81
|
+
deserialized_property = object['etag']
|
82
|
+
output_object.etag = deserialized_property
|
83
|
+
|
84
|
+
output_object.validate
|
85
|
+
|
86
|
+
output_object
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -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::Network
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Response for ListSubnets Api service callRetrieves all subnet that
|
10
|
+
# belongs to a virtual network
|
11
|
+
#
|
12
|
+
class SubnetListResult
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [Array<Subnet>] Gets the subnets in a virtual network
|
17
|
+
attr_accessor :value
|
18
|
+
|
19
|
+
# @return [String] Gets 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 = Subnet.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 [SubnetListResult] Deserialized object.
|
61
|
+
#
|
62
|
+
def self.deserialize_object(object)
|
63
|
+
return if object.nil?
|
64
|
+
output_object = SubnetListResult.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 = Subnet.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,115 @@
|
|
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::Network
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Model object.
|
10
|
+
#
|
11
|
+
class SubnetPropertiesFormat
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets Address prefix for the subnet.
|
16
|
+
attr_accessor :address_prefix
|
17
|
+
|
18
|
+
# @return [SubResource] Gets or sets the reference of the
|
19
|
+
# NetworkSecurityGroup resource
|
20
|
+
attr_accessor :network_security_group
|
21
|
+
|
22
|
+
# @return [Array<SubResource>] Gets array of references to the network
|
23
|
+
# interface IP configurations using subnet
|
24
|
+
attr_accessor :ip_configurations
|
25
|
+
|
26
|
+
# @return [String] Gets or sets Provisioning state of the PublicIP
|
27
|
+
# resource Updating/Deleting/Failed
|
28
|
+
attr_accessor :provisioning_state
|
29
|
+
|
30
|
+
#
|
31
|
+
# Validate the object. Throws ValidationError if validation fails.
|
32
|
+
#
|
33
|
+
def validate
|
34
|
+
@network_security_group.validate unless @network_security_group.nil?
|
35
|
+
@ip_configurations.each{ |e| e.validate if e.respond_to?(:validate) } unless @ip_configurations.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.address_prefix
|
48
|
+
output_object['addressPrefix'] = serialized_property unless serialized_property.nil?
|
49
|
+
|
50
|
+
serialized_property = object.network_security_group
|
51
|
+
unless serialized_property.nil?
|
52
|
+
serialized_property = SubResource.serialize_object(serialized_property)
|
53
|
+
end
|
54
|
+
output_object['networkSecurityGroup'] = serialized_property unless serialized_property.nil?
|
55
|
+
|
56
|
+
serialized_property = object.ip_configurations
|
57
|
+
unless serialized_property.nil?
|
58
|
+
serializedArray = []
|
59
|
+
serialized_property.each do |element|
|
60
|
+
unless element.nil?
|
61
|
+
element = SubResource.serialize_object(element)
|
62
|
+
end
|
63
|
+
serializedArray.push(element)
|
64
|
+
end
|
65
|
+
serialized_property = serializedArray
|
66
|
+
end
|
67
|
+
output_object['ipConfigurations'] = serialized_property unless serialized_property.nil?
|
68
|
+
|
69
|
+
serialized_property = object.provisioning_state
|
70
|
+
output_object['provisioningState'] = serialized_property unless serialized_property.nil?
|
71
|
+
|
72
|
+
output_object
|
73
|
+
end
|
74
|
+
|
75
|
+
#
|
76
|
+
# Deserializes given Ruby Hash into Model object.
|
77
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
78
|
+
# @return [SubnetPropertiesFormat] Deserialized object.
|
79
|
+
#
|
80
|
+
def self.deserialize_object(object)
|
81
|
+
return if object.nil?
|
82
|
+
output_object = SubnetPropertiesFormat.new
|
83
|
+
|
84
|
+
deserialized_property = object['addressPrefix']
|
85
|
+
output_object.address_prefix = deserialized_property
|
86
|
+
|
87
|
+
deserialized_property = object['networkSecurityGroup']
|
88
|
+
unless deserialized_property.nil?
|
89
|
+
deserialized_property = SubResource.deserialize_object(deserialized_property)
|
90
|
+
end
|
91
|
+
output_object.network_security_group = deserialized_property
|
92
|
+
|
93
|
+
deserialized_property = object['ipConfigurations']
|
94
|
+
unless deserialized_property.nil?
|
95
|
+
deserializedArray = [];
|
96
|
+
deserialized_property.each do |element1|
|
97
|
+
unless element1.nil?
|
98
|
+
element1 = SubResource.deserialize_object(element1)
|
99
|
+
end
|
100
|
+
deserializedArray.push(element1);
|
101
|
+
end
|
102
|
+
deserialized_property = deserializedArray;
|
103
|
+
end
|
104
|
+
output_object.ip_configurations = deserialized_property
|
105
|
+
|
106
|
+
deserialized_property = object['provisioningState']
|
107
|
+
output_object.provisioning_state = deserialized_property
|
108
|
+
|
109
|
+
output_object.validate
|
110
|
+
|
111
|
+
output_object
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
@@ -0,0 +1,16 @@
|
|
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::Network
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for TransportProtocol
|
10
|
+
#
|
11
|
+
module TransportProtocol
|
12
|
+
Udp = "Udp"
|
13
|
+
Tcp = "Tcp"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,98 @@
|
|
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::Network
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Describes Network Resource Usage.
|
10
|
+
#
|
11
|
+
class Usage
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [UsageUnit] Gets or sets an enum describing the unit of
|
16
|
+
# measurement. Possible values for this property include: 'Count'.
|
17
|
+
attr_accessor :unit
|
18
|
+
|
19
|
+
# @return [Integer] Gets or sets the current value of the usage.
|
20
|
+
attr_accessor :current_value
|
21
|
+
|
22
|
+
# @return [Integer] Gets or sets the limit of usage.
|
23
|
+
attr_accessor :limit
|
24
|
+
|
25
|
+
# @return [UsageName] Gets or sets the name of the type of usage.
|
26
|
+
attr_accessor :name
|
27
|
+
|
28
|
+
#
|
29
|
+
# Validate the object. Throws ValidationError if validation fails.
|
30
|
+
#
|
31
|
+
def validate
|
32
|
+
@name.validate unless @name.nil?
|
33
|
+
end
|
34
|
+
|
35
|
+
#
|
36
|
+
# Serializes given Model object into Ruby Hash.
|
37
|
+
# @param object Model object to serialize.
|
38
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
39
|
+
#
|
40
|
+
def self.serialize_object(object)
|
41
|
+
object.validate
|
42
|
+
output_object = {}
|
43
|
+
|
44
|
+
serialized_property = object.unit
|
45
|
+
output_object['unit'] = serialized_property unless serialized_property.nil?
|
46
|
+
|
47
|
+
serialized_property = object.current_value
|
48
|
+
output_object['currentValue'] = serialized_property unless serialized_property.nil?
|
49
|
+
|
50
|
+
serialized_property = object.limit
|
51
|
+
output_object['limit'] = serialized_property unless serialized_property.nil?
|
52
|
+
|
53
|
+
serialized_property = object.name
|
54
|
+
unless serialized_property.nil?
|
55
|
+
serialized_property = UsageName.serialize_object(serialized_property)
|
56
|
+
end
|
57
|
+
output_object['name'] = serialized_property unless serialized_property.nil?
|
58
|
+
|
59
|
+
output_object
|
60
|
+
end
|
61
|
+
|
62
|
+
#
|
63
|
+
# Deserializes given Ruby Hash into Model object.
|
64
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
65
|
+
# @return [Usage] Deserialized object.
|
66
|
+
#
|
67
|
+
def self.deserialize_object(object)
|
68
|
+
return if object.nil?
|
69
|
+
output_object = Usage.new
|
70
|
+
|
71
|
+
deserialized_property = object['unit']
|
72
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
73
|
+
enum_is_valid = UsageUnit.constants.any? { |e| UsageUnit.const_get(e).to_s.downcase == deserialized_property.downcase }
|
74
|
+
fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid
|
75
|
+
end
|
76
|
+
output_object.unit = deserialized_property
|
77
|
+
|
78
|
+
deserialized_property = object['currentValue']
|
79
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
80
|
+
output_object.current_value = deserialized_property
|
81
|
+
|
82
|
+
deserialized_property = object['limit']
|
83
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
84
|
+
output_object.limit = deserialized_property
|
85
|
+
|
86
|
+
deserialized_property = object['name']
|
87
|
+
unless deserialized_property.nil?
|
88
|
+
deserialized_property = UsageName.deserialize_object(deserialized_property)
|
89
|
+
end
|
90
|
+
output_object.name = deserialized_property
|
91
|
+
|
92
|
+
output_object.validate
|
93
|
+
|
94
|
+
output_object
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,68 @@
|
|
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::Network
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The Usage Names.
|
10
|
+
#
|
11
|
+
class UsageName
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets a string describing the resource name.
|
16
|
+
attr_accessor :value
|
17
|
+
|
18
|
+
# @return [String] Gets or sets a localized string describing the
|
19
|
+
# resource name.
|
20
|
+
attr_accessor :localized_value
|
21
|
+
|
22
|
+
#
|
23
|
+
# Validate the object. Throws ValidationError if validation fails.
|
24
|
+
#
|
25
|
+
def validate
|
26
|
+
# Nothing to validate
|
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
|
+
output_object['value'] = serialized_property unless serialized_property.nil?
|
40
|
+
|
41
|
+
serialized_property = object.localized_value
|
42
|
+
output_object['localizedValue'] = serialized_property unless serialized_property.nil?
|
43
|
+
|
44
|
+
output_object
|
45
|
+
end
|
46
|
+
|
47
|
+
#
|
48
|
+
# Deserializes given Ruby Hash into Model object.
|
49
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
50
|
+
# @return [UsageName] Deserialized object.
|
51
|
+
#
|
52
|
+
def self.deserialize_object(object)
|
53
|
+
return if object.nil?
|
54
|
+
output_object = UsageName.new
|
55
|
+
|
56
|
+
deserialized_property = object['value']
|
57
|
+
output_object.value = deserialized_property
|
58
|
+
|
59
|
+
deserialized_property = object['localizedValue']
|
60
|
+
output_object.localized_value = deserialized_property
|
61
|
+
|
62
|
+
output_object.validate
|
63
|
+
|
64
|
+
output_object
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|