azure_mgmt_network 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.rspec +3 -0
  4. data/.travis.yml +3 -0
  5. data/Gemfile +15 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +131 -0
  8. data/Rakefile +5 -0
  9. data/azure_mgmt_network.gemspec +39 -0
  10. data/lib/azure_mgmt_network.rb +139 -0
  11. data/lib/azure_mgmt_network/Models/address_space.rb +60 -0
  12. data/lib/azure_mgmt_network/Models/application_gateway.rb +104 -0
  13. data/lib/azure_mgmt_network/Models/application_gateway_backend_address.rb +67 -0
  14. data/lib/azure_mgmt_network/Models/application_gateway_backend_address_pool.rb +90 -0
  15. data/lib/azure_mgmt_network/Models/application_gateway_backend_address_pool_properties_format.rb +121 -0
  16. data/lib/azure_mgmt_network/Models/application_gateway_backend_http_settings.rb +90 -0
  17. data/lib/azure_mgmt_network/Models/application_gateway_backend_http_settings_properties_format.rb +98 -0
  18. data/lib/azure_mgmt_network/Models/application_gateway_cookie_based_affinity.rb +16 -0
  19. data/lib/azure_mgmt_network/Models/application_gateway_frontend_ip_configuration.rb +91 -0
  20. data/lib/azure_mgmt_network/Models/application_gateway_frontend_ip_configuration_properties_format.rb +117 -0
  21. data/lib/azure_mgmt_network/Models/application_gateway_frontend_port.rb +90 -0
  22. data/lib/azure_mgmt_network/Models/application_gateway_frontend_port_properties_format.rb +70 -0
  23. data/lib/azure_mgmt_network/Models/application_gateway_http_listener.rb +90 -0
  24. data/lib/azure_mgmt_network/Models/application_gateway_http_listener_properties_format.rb +124 -0
  25. data/lib/azure_mgmt_network/Models/application_gateway_ip_configuration.rb +90 -0
  26. data/lib/azure_mgmt_network/Models/application_gateway_ip_configuration_properties_format.rb +77 -0
  27. data/lib/azure_mgmt_network/Models/application_gateway_list_result.rb +88 -0
  28. data/lib/azure_mgmt_network/Models/application_gateway_operational_state.rb +18 -0
  29. data/lib/azure_mgmt_network/Models/application_gateway_properties_format.rb +338 -0
  30. data/lib/azure_mgmt_network/Models/application_gateway_protocol.rb +16 -0
  31. data/lib/azure_mgmt_network/Models/application_gateway_request_routing_rule.rb +90 -0
  32. data/lib/azure_mgmt_network/Models/application_gateway_request_routing_rule_properties_format.rb +124 -0
  33. data/lib/azure_mgmt_network/Models/application_gateway_request_routing_rule_type.rb +15 -0
  34. data/lib/azure_mgmt_network/Models/application_gateway_sku.rb +88 -0
  35. data/lib/azure_mgmt_network/Models/application_gateway_sku_name.rb +17 -0
  36. data/lib/azure_mgmt_network/Models/application_gateway_ssl_certificate.rb +90 -0
  37. data/lib/azure_mgmt_network/Models/application_gateway_ssl_certificate_properties_format.rb +87 -0
  38. data/lib/azure_mgmt_network/Models/application_gateway_tier.rb +15 -0
  39. data/lib/azure_mgmt_network/Models/azure_async_operation_result.rb +85 -0
  40. data/lib/azure_mgmt_network/Models/backend_address_pool.rb +90 -0
  41. data/lib/azure_mgmt_network/Models/backend_address_pool_properties_format.rb +120 -0
  42. data/lib/azure_mgmt_network/Models/connection_reset_shared_key.rb +64 -0
  43. data/lib/azure_mgmt_network/Models/connection_reset_shared_key_properties_format.rb +60 -0
  44. data/lib/azure_mgmt_network/Models/connection_shared_key.rb +58 -0
  45. data/lib/azure_mgmt_network/Models/dhcp_options.rb +60 -0
  46. data/lib/azure_mgmt_network/Models/dns_name_availability_result.rb +58 -0
  47. data/lib/azure_mgmt_network/Models/error.rb +114 -0
  48. data/lib/azure_mgmt_network/Models/error_details.rb +76 -0
  49. data/lib/azure_mgmt_network/Models/frontend_ip_configuration.rb +90 -0
  50. data/lib/azure_mgmt_network/Models/frontend_ip_configuration_properties_format.rb +181 -0
  51. data/lib/azure_mgmt_network/Models/inbound_nat_rule.rb +90 -0
  52. data/lib/azure_mgmt_network/Models/inbound_nat_rule_properties_format.rb +163 -0
  53. data/lib/azure_mgmt_network/Models/ip_allocation_method.rb +16 -0
  54. data/lib/azure_mgmt_network/Models/load_balancer.rb +104 -0
  55. data/lib/azure_mgmt_network/Models/load_balancer_list_result.rb +88 -0
  56. data/lib/azure_mgmt_network/Models/load_balancer_properties_format.rb +210 -0
  57. data/lib/azure_mgmt_network/Models/load_balancing_rule.rb +90 -0
  58. data/lib/azure_mgmt_network/Models/load_balancing_rule_properties_format.rb +195 -0
  59. data/lib/azure_mgmt_network/Models/load_distribution.rb +17 -0
  60. data/lib/azure_mgmt_network/Models/local_network_gateway.rb +104 -0
  61. data/lib/azure_mgmt_network/Models/local_network_gateway_list_result.rb +88 -0
  62. data/lib/azure_mgmt_network/Models/local_network_gateway_properties_format.rb +83 -0
  63. data/lib/azure_mgmt_network/Models/network_interface.rb +104 -0
  64. data/lib/azure_mgmt_network/Models/network_interface_dns_settings.rb +89 -0
  65. data/lib/azure_mgmt_network/Models/network_interface_ip_configuration.rb +90 -0
  66. data/lib/azure_mgmt_network/Models/network_interface_ip_configuration_properties_format.rb +179 -0
  67. data/lib/azure_mgmt_network/Models/network_interface_list_result.rb +88 -0
  68. data/lib/azure_mgmt_network/Models/network_interface_properties_format.rb +158 -0
  69. data/lib/azure_mgmt_network/Models/network_security_group.rb +104 -0
  70. data/lib/azure_mgmt_network/Models/network_security_group_list_result.rb +88 -0
  71. data/lib/azure_mgmt_network/Models/network_security_group_properties_format.rb +181 -0
  72. data/lib/azure_mgmt_network/Models/operation_status.rb +17 -0
  73. data/lib/azure_mgmt_network/Models/probe.rb +90 -0
  74. data/lib/azure_mgmt_network/Models/probe_properties_format.rb +157 -0
  75. data/lib/azure_mgmt_network/Models/probe_protocol.rb +16 -0
  76. data/lib/azure_mgmt_network/Models/public_ip_address.rb +104 -0
  77. data/lib/azure_mgmt_network/Models/public_ip_address_dns_settings.rb +85 -0
  78. data/lib/azure_mgmt_network/Models/public_ip_address_list_result.rb +88 -0
  79. data/lib/azure_mgmt_network/Models/public_ip_address_properties_format.rb +126 -0
  80. data/lib/azure_mgmt_network/Models/security_rule.rb +90 -0
  81. data/lib/azure_mgmt_network/Models/security_rule_access.rb +16 -0
  82. data/lib/azure_mgmt_network/Models/security_rule_direction.rb +16 -0
  83. data/lib/azure_mgmt_network/Models/security_rule_list_result.rb +89 -0
  84. data/lib/azure_mgmt_network/Models/security_rule_properties_format.rb +174 -0
  85. data/lib/azure_mgmt_network/Models/security_rule_protocol.rb +17 -0
  86. data/lib/azure_mgmt_network/Models/subnet.rb +90 -0
  87. data/lib/azure_mgmt_network/Models/subnet_list_result.rb +88 -0
  88. data/lib/azure_mgmt_network/Models/subnet_properties_format.rb +115 -0
  89. data/lib/azure_mgmt_network/Models/transport_protocol.rb +16 -0
  90. data/lib/azure_mgmt_network/Models/usage.rb +98 -0
  91. data/lib/azure_mgmt_network/Models/usage_name.rb +68 -0
  92. data/lib/azure_mgmt_network/Models/usage_unit.rb +15 -0
  93. data/lib/azure_mgmt_network/Models/usages_list_result.rb +78 -0
  94. data/lib/azure_mgmt_network/Models/virtual_network.rb +104 -0
  95. data/lib/azure_mgmt_network/Models/virtual_network_gateway.rb +104 -0
  96. data/lib/azure_mgmt_network/Models/virtual_network_gateway_connection.rb +104 -0
  97. data/lib/azure_mgmt_network/Models/virtual_network_gateway_connection_list_result.rb +89 -0
  98. data/lib/azure_mgmt_network/Models/virtual_network_gateway_connection_properties_format.rb +141 -0
  99. data/lib/azure_mgmt_network/Models/virtual_network_gateway_connection_type.rb +18 -0
  100. data/lib/azure_mgmt_network/Models/virtual_network_gateway_ip_configuration.rb +90 -0
  101. data/lib/azure_mgmt_network/Models/virtual_network_gateway_ip_configuration_properties_format.rb +117 -0
  102. data/lib/azure_mgmt_network/Models/virtual_network_gateway_list_result.rb +88 -0
  103. data/lib/azure_mgmt_network/Models/virtual_network_gateway_properties_format.rb +126 -0
  104. data/lib/azure_mgmt_network/Models/virtual_network_gateway_type.rb +15 -0
  105. data/lib/azure_mgmt_network/Models/virtual_network_list_result.rb +88 -0
  106. data/lib/azure_mgmt_network/Models/virtual_network_properties_format.rb +123 -0
  107. data/lib/azure_mgmt_network/Models/vpn_type.rb +16 -0
  108. data/lib/azure_mgmt_network/application_gateways.rb +915 -0
  109. data/lib/azure_mgmt_network/load_balancers.rb +709 -0
  110. data/lib/azure_mgmt_network/local_network_gateways.rb +550 -0
  111. data/lib/azure_mgmt_network/module_definition.rb +6 -0
  112. data/lib/azure_mgmt_network/network_interfaces.rb +709 -0
  113. data/lib/azure_mgmt_network/network_resource_provider_client.rb +195 -0
  114. data/lib/azure_mgmt_network/network_security_groups.rb +718 -0
  115. data/lib/azure_mgmt_network/public_ip_addresses.rb +711 -0
  116. data/lib/azure_mgmt_network/security_rules.rb +563 -0
  117. data/lib/azure_mgmt_network/subnets.rb +552 -0
  118. data/lib/azure_mgmt_network/usages.rb +113 -0
  119. data/lib/azure_mgmt_network/version.rb +6 -0
  120. data/lib/azure_mgmt_network/virtual_network_gateway_connections.rb +945 -0
  121. data/lib/azure_mgmt_network/virtual_network_gateways.rb +686 -0
  122. data/lib/azure_mgmt_network/virtual_networks.rb +707 -0
  123. metadata +311 -0
@@ -0,0 +1,126 @@
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
+ # PublicIpAddress properties
10
+ #
11
+ class PublicIpAddressPropertiesFormat
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [IpAllocationMethod] Gets or sets PublicIP allocation method
16
+ # (Static/Dynamic). Possible values for this property include:
17
+ # 'Static', 'Dynamic'.
18
+ attr_accessor :public_ipallocation_method
19
+
20
+ # @return [SubResource] Gets a reference to the network interface IP
21
+ # configurations using this public IP address
22
+ attr_accessor :ip_configuration
23
+
24
+ # @return [PublicIpAddressDnsSettings] Gets or sets FQDN of the DNS
25
+ # record associated with the public IP address
26
+ attr_accessor :dns_settings
27
+
28
+ # @return [String] Gets the assigned public IP address
29
+ attr_accessor :ip_address
30
+
31
+ # @return [Integer] Gets or sets the Idletimeout of the public IP address
32
+ attr_accessor :idle_timeout_in_minutes
33
+
34
+ # @return [String] Gets or sets Provisioning state of the PublicIP
35
+ # resource Updating/Deleting/Failed
36
+ attr_accessor :provisioning_state
37
+
38
+ #
39
+ # Validate the object. Throws ValidationError if validation fails.
40
+ #
41
+ def validate
42
+ @ip_configuration.validate unless @ip_configuration.nil?
43
+ @dns_settings.validate unless @dns_settings.nil?
44
+ end
45
+
46
+ #
47
+ # Serializes given Model object into Ruby Hash.
48
+ # @param object Model object to serialize.
49
+ # @return [Hash] Serialized object in form of Ruby Hash.
50
+ #
51
+ def self.serialize_object(object)
52
+ object.validate
53
+ output_object = {}
54
+
55
+ serialized_property = object.public_ipallocation_method
56
+ output_object['publicIPAllocationMethod'] = serialized_property unless serialized_property.nil?
57
+
58
+ serialized_property = object.ip_configuration
59
+ unless serialized_property.nil?
60
+ serialized_property = SubResource.serialize_object(serialized_property)
61
+ end
62
+ output_object['ipConfiguration'] = serialized_property unless serialized_property.nil?
63
+
64
+ serialized_property = object.dns_settings
65
+ unless serialized_property.nil?
66
+ serialized_property = PublicIpAddressDnsSettings.serialize_object(serialized_property)
67
+ end
68
+ output_object['dnsSettings'] = serialized_property unless serialized_property.nil?
69
+
70
+ serialized_property = object.ip_address
71
+ output_object['ipAddress'] = serialized_property unless serialized_property.nil?
72
+
73
+ serialized_property = object.idle_timeout_in_minutes
74
+ output_object['idleTimeoutInMinutes'] = serialized_property unless serialized_property.nil?
75
+
76
+ serialized_property = object.provisioning_state
77
+ output_object['provisioningState'] = serialized_property unless serialized_property.nil?
78
+
79
+ output_object
80
+ end
81
+
82
+ #
83
+ # Deserializes given Ruby Hash into Model object.
84
+ # @param object [Hash] Ruby Hash object to deserialize.
85
+ # @return [PublicIpAddressPropertiesFormat] Deserialized object.
86
+ #
87
+ def self.deserialize_object(object)
88
+ return if object.nil?
89
+ output_object = PublicIpAddressPropertiesFormat.new
90
+
91
+ deserialized_property = object['publicIPAllocationMethod']
92
+ if (!deserialized_property.nil? && !deserialized_property.empty?)
93
+ enum_is_valid = IpAllocationMethod.constants.any? { |e| IpAllocationMethod.const_get(e).to_s.downcase == deserialized_property.downcase }
94
+ fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid
95
+ end
96
+ output_object.public_ipallocation_method = deserialized_property
97
+
98
+ deserialized_property = object['ipConfiguration']
99
+ unless deserialized_property.nil?
100
+ deserialized_property = SubResource.deserialize_object(deserialized_property)
101
+ end
102
+ output_object.ip_configuration = deserialized_property
103
+
104
+ deserialized_property = object['dnsSettings']
105
+ unless deserialized_property.nil?
106
+ deserialized_property = PublicIpAddressDnsSettings.deserialize_object(deserialized_property)
107
+ end
108
+ output_object.dns_settings = deserialized_property
109
+
110
+ deserialized_property = object['ipAddress']
111
+ output_object.ip_address = deserialized_property
112
+
113
+ deserialized_property = object['idleTimeoutInMinutes']
114
+ deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
115
+ output_object.idle_timeout_in_minutes = deserialized_property
116
+
117
+ deserialized_property = object['provisioningState']
118
+ output_object.provisioning_state = deserialized_property
119
+
120
+ output_object.validate
121
+
122
+ output_object
123
+ end
124
+ end
125
+ end
126
+ 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
+ # Network security rule
10
+ #
11
+ class SecurityRule < MsRestAzure::SubResource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [SecurityRulePropertiesFormat]
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 = SecurityRulePropertiesFormat.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 [SecurityRule] Deserialized object.
64
+ #
65
+ def self.deserialize_object(object)
66
+ return if object.nil?
67
+ output_object = SecurityRule.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 = SecurityRulePropertiesFormat.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,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 SecurityRuleAccess
10
+ #
11
+ module SecurityRuleAccess
12
+ Allow = "Allow"
13
+ Deny = "Deny"
14
+ end
15
+ end
16
+ 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 SecurityRuleDirection
10
+ #
11
+ module SecurityRuleDirection
12
+ Inbound = "Inbound"
13
+ Outbound = "Outbound"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,89 @@
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 ListSecurityRule Api service callRetrieves all security
10
+ # rules that belongs to a network security group
11
+ #
12
+ class SecurityRuleListResult
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [Array<SecurityRule>] Gets security rules in a network
17
+ # security group
18
+ attr_accessor :value
19
+
20
+ # @return [String] Gets the URL to get the next set of results.
21
+ attr_accessor :next_link
22
+
23
+ #
24
+ # Validate the object. Throws ValidationError if validation fails.
25
+ #
26
+ def validate
27
+ @value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil?
28
+ end
29
+
30
+ #
31
+ # Serializes given Model object into Ruby Hash.
32
+ # @param object Model object to serialize.
33
+ # @return [Hash] Serialized object in form of Ruby Hash.
34
+ #
35
+ def self.serialize_object(object)
36
+ object.validate
37
+ output_object = {}
38
+
39
+ serialized_property = object.value
40
+ unless serialized_property.nil?
41
+ serializedArray = []
42
+ serialized_property.each do |element|
43
+ unless element.nil?
44
+ element = SecurityRule.serialize_object(element)
45
+ end
46
+ serializedArray.push(element)
47
+ end
48
+ serialized_property = serializedArray
49
+ end
50
+ output_object['value'] = serialized_property unless serialized_property.nil?
51
+
52
+ serialized_property = object.next_link
53
+ output_object['nextLink'] = serialized_property unless serialized_property.nil?
54
+
55
+ output_object
56
+ end
57
+
58
+ #
59
+ # Deserializes given Ruby Hash into Model object.
60
+ # @param object [Hash] Ruby Hash object to deserialize.
61
+ # @return [SecurityRuleListResult] Deserialized object.
62
+ #
63
+ def self.deserialize_object(object)
64
+ return if object.nil?
65
+ output_object = SecurityRuleListResult.new
66
+
67
+ deserialized_property = object['value']
68
+ unless deserialized_property.nil?
69
+ deserializedArray = [];
70
+ deserialized_property.each do |element1|
71
+ unless element1.nil?
72
+ element1 = SecurityRule.deserialize_object(element1)
73
+ end
74
+ deserializedArray.push(element1);
75
+ end
76
+ deserialized_property = deserializedArray;
77
+ end
78
+ output_object.value = deserialized_property
79
+
80
+ deserialized_property = object['nextLink']
81
+ output_object.next_link = deserialized_property
82
+
83
+ output_object.validate
84
+
85
+ output_object
86
+ end
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,174 @@
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 SecurityRulePropertiesFormat
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets a description for this rule. Restricted
16
+ # to 140 chars.
17
+ attr_accessor :description
18
+
19
+ # @return [SecurityRuleProtocol] Gets or sets Network protocol this rule
20
+ # applies to. Can be Tcp, Udp or All(*). Possible values for this
21
+ # property include: 'Tcp', 'Udp', '*'.
22
+ attr_accessor :protocol
23
+
24
+ # @return [String] Gets or sets Source Port or Range. Integer or range
25
+ # between 0 and 65535. Asterix “*” can also be used to match all
26
+ # ports.
27
+ attr_accessor :source_port_range
28
+
29
+ # @return [String] Gets or sets Destination Port or Range. Integer or
30
+ # range between 0 and 65535. Asterix “*” can also be used to match
31
+ # all ports.
32
+ attr_accessor :destination_port_range
33
+
34
+ # @return [String] Gets or sets source address prefix. CIDR or source IP
35
+ # range. Asterix “*” can also be used to match all source IPs.
36
+ # Default tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’
37
+ # and ‘Internet’ can also be used. If this is an ingress rule,
38
+ # specifies where network traffic originates from.
39
+ attr_accessor :source_address_prefix
40
+
41
+ # @return [String] Gets or sets destination address prefix. CIDR or
42
+ # source IP range. Asterix “*” can also be used to match all source
43
+ # IPs. Default tags such as ‘VirtualNetwork’,
44
+ # ‘AzureLoadBalancer’ and ‘Internet’ can also be used.
45
+ attr_accessor :destination_address_prefix
46
+
47
+ # @return [SecurityRuleAccess] Gets or sets network traffic is allowed
48
+ # or denied. Possible values are “Allow” and “Deny”. Possible
49
+ # values for this property include: 'Allow', 'Deny'.
50
+ attr_accessor :access
51
+
52
+ # @return [Integer] Gets or sets the priority of the rule. The value can
53
+ # be between 100 and 4096. The priority number must be unique for each
54
+ # rule in the collection. The lower the priority number, the higher the
55
+ # priority of the rule.
56
+ attr_accessor :priority
57
+
58
+ # @return [SecurityRuleDirection] Gets or sets the direction of the
59
+ # rule.InBound or Outbound. The direction specifies if rule will be
60
+ # evaluated on incoming or outcoming traffic. Possible values for this
61
+ # property include: 'Inbound', 'Outbound'.
62
+ attr_accessor :direction
63
+
64
+ # @return [String] Gets or sets Provisioning state of the PublicIP
65
+ # resource Updating/Deleting/Failed
66
+ attr_accessor :provisioning_state
67
+
68
+ #
69
+ # Validate the object. Throws ValidationError if validation fails.
70
+ #
71
+ def validate
72
+ end
73
+
74
+ #
75
+ # Serializes given Model object into Ruby Hash.
76
+ # @param object Model object to serialize.
77
+ # @return [Hash] Serialized object in form of Ruby Hash.
78
+ #
79
+ def self.serialize_object(object)
80
+ object.validate
81
+ output_object = {}
82
+
83
+ serialized_property = object.description
84
+ output_object['description'] = serialized_property unless serialized_property.nil?
85
+
86
+ serialized_property = object.protocol
87
+ output_object['protocol'] = serialized_property unless serialized_property.nil?
88
+
89
+ serialized_property = object.source_port_range
90
+ output_object['sourcePortRange'] = serialized_property unless serialized_property.nil?
91
+
92
+ serialized_property = object.destination_port_range
93
+ output_object['destinationPortRange'] = serialized_property unless serialized_property.nil?
94
+
95
+ serialized_property = object.source_address_prefix
96
+ output_object['sourceAddressPrefix'] = serialized_property unless serialized_property.nil?
97
+
98
+ serialized_property = object.destination_address_prefix
99
+ output_object['destinationAddressPrefix'] = serialized_property unless serialized_property.nil?
100
+
101
+ serialized_property = object.access
102
+ output_object['access'] = serialized_property unless serialized_property.nil?
103
+
104
+ serialized_property = object.priority
105
+ output_object['priority'] = serialized_property unless serialized_property.nil?
106
+
107
+ serialized_property = object.direction
108
+ output_object['direction'] = serialized_property unless serialized_property.nil?
109
+
110
+ serialized_property = object.provisioning_state
111
+ output_object['provisioningState'] = serialized_property unless serialized_property.nil?
112
+
113
+ output_object
114
+ end
115
+
116
+ #
117
+ # Deserializes given Ruby Hash into Model object.
118
+ # @param object [Hash] Ruby Hash object to deserialize.
119
+ # @return [SecurityRulePropertiesFormat] Deserialized object.
120
+ #
121
+ def self.deserialize_object(object)
122
+ return if object.nil?
123
+ output_object = SecurityRulePropertiesFormat.new
124
+
125
+ deserialized_property = object['description']
126
+ output_object.description = deserialized_property
127
+
128
+ deserialized_property = object['protocol']
129
+ if (!deserialized_property.nil? && !deserialized_property.empty?)
130
+ enum_is_valid = SecurityRuleProtocol.constants.any? { |e| SecurityRuleProtocol.const_get(e).to_s.downcase == deserialized_property.downcase }
131
+ fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid
132
+ end
133
+ output_object.protocol = deserialized_property
134
+
135
+ deserialized_property = object['sourcePortRange']
136
+ output_object.source_port_range = deserialized_property
137
+
138
+ deserialized_property = object['destinationPortRange']
139
+ output_object.destination_port_range = deserialized_property
140
+
141
+ deserialized_property = object['sourceAddressPrefix']
142
+ output_object.source_address_prefix = deserialized_property
143
+
144
+ deserialized_property = object['destinationAddressPrefix']
145
+ output_object.destination_address_prefix = deserialized_property
146
+
147
+ deserialized_property = object['access']
148
+ if (!deserialized_property.nil? && !deserialized_property.empty?)
149
+ enum_is_valid = SecurityRuleAccess.constants.any? { |e| SecurityRuleAccess.const_get(e).to_s.downcase == deserialized_property.downcase }
150
+ fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid
151
+ end
152
+ output_object.access = deserialized_property
153
+
154
+ deserialized_property = object['priority']
155
+ deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
156
+ output_object.priority = deserialized_property
157
+
158
+ deserialized_property = object['direction']
159
+ if (!deserialized_property.nil? && !deserialized_property.empty?)
160
+ enum_is_valid = SecurityRuleDirection.constants.any? { |e| SecurityRuleDirection.const_get(e).to_s.downcase == deserialized_property.downcase }
161
+ fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid
162
+ end
163
+ output_object.direction = deserialized_property
164
+
165
+ deserialized_property = object['provisioningState']
166
+ output_object.provisioning_state = deserialized_property
167
+
168
+ output_object.validate
169
+
170
+ output_object
171
+ end
172
+ end
173
+ end
174
+ end