Class: Azure::ARM::Network::Models::InboundNatPoolPropertiesFormat
- Inherits:
-
Object
- Object
- Azure::ARM::Network::Models::InboundNatPoolPropertiesFormat
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_network/models/inbound_nat_pool_properties_format.rb
Overview
Properties of Inbound NAT pool
Instance Attribute Summary collapse
-
#backend_port ⇒ Integer
the endpoint.
-
#frontend_ipconfiguration ⇒ SubResource
Gets or sets a reference to frontend IP Addresses.
-
#frontend_port_range_end ⇒ Integer
You can spcify any port number you choose, but the port numbers specified for each role in the service must be unique.
-
#frontend_port_range_start ⇒ Integer
pool.
-
#protocol ⇒ TransportProtocol
external endpoint.
-
#provisioning_state ⇒ String
resource Updating/Deleting/Failed.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ InboundNatPoolPropertiesFormat
Deserializes given Ruby Hash into Model object.
-
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
Instance Method Summary collapse
-
#validate ⇒ Object
Validate the object.
Instance Attribute Details
#backend_port ⇒ Integer
the endpoint. The localPort attribute maps the eternal port of the endpoint to an internal port on a role. This is useful in scenarios where a role must communicate to an internal compotnent on a port that is different from the one that is exposed externally. If not specified, the value of localPort is the same as the port attribute. Set the value of localPort to ‘*’ to automatically assign an unallocated port that is discoverable using the runtime API
43 44 45 |
# File 'lib/azure_mgmt_network/models/inbound_nat_pool_properties_format.rb', line 43 def backend_port @backend_port end |
#frontend_ipconfiguration ⇒ SubResource
Returns Gets or sets a reference to frontend IP Addresses.
16 17 18 |
# File 'lib/azure_mgmt_network/models/inbound_nat_pool_properties_format.rb', line 16 def frontend_ipconfiguration @frontend_ipconfiguration end |
#frontend_port_range_end ⇒ Integer
You can spcify any port number you choose, but the port numbers specified for each role in the service must be unique. Possible values range between 1 and 65535, inclusive
33 34 35 |
# File 'lib/azure_mgmt_network/models/inbound_nat_pool_properties_format.rb', line 33 def frontend_port_range_end @frontend_port_range_end end |
#frontend_port_range_start ⇒ Integer
pool. You can spcify any port number you choose, but the port numbers specified for each role in the service must be unique. Possible values range between 1 and 65535, inclusive
27 28 29 |
# File 'lib/azure_mgmt_network/models/inbound_nat_pool_properties_format.rb', line 27 def frontend_port_range_start @frontend_port_range_start end |
#protocol ⇒ TransportProtocol
external endpoint. Possible values are Udp or Tcp. Possible values include: ‘Udp’, ‘Tcp’
21 22 23 |
# File 'lib/azure_mgmt_network/models/inbound_nat_pool_properties_format.rb', line 21 def protocol @protocol end |
#provisioning_state ⇒ String
resource Updating/Deleting/Failed
47 48 49 |
# File 'lib/azure_mgmt_network/models/inbound_nat_pool_properties_format.rb', line 47 def provisioning_state @provisioning_state end |
Class Method Details
.deserialize_object(object) ⇒ InboundNatPoolPropertiesFormat
Deserializes given Ruby Hash into Model object.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/azure_mgmt_network/models/inbound_nat_pool_properties_format.rb', line 98 def self.deserialize_object(object) return if object.nil? output_object = InboundNatPoolPropertiesFormat.new deserialized_property = object['protocol'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = TransportProtocol.constants.any? { |e| TransportProtocol.const_get(e).to_s.downcase == deserialized_property.downcase } warn 'Enum TransportProtocol does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid end output_object.protocol = deserialized_property deserialized_property = object['frontendPortRangeStart'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.frontend_port_range_start = deserialized_property deserialized_property = object['frontendPortRangeEnd'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.frontend_port_range_end = deserialized_property deserialized_property = object['backendPort'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.backend_port = deserialized_property deserialized_property = object['frontendIPConfiguration'] unless deserialized_property.nil? deserialized_property = MsRestAzure::SubResource.deserialize_object(deserialized_property) end output_object.frontend_ipconfiguration = deserialized_property deserialized_property = object['provisioningState'] output_object.provisioning_state = deserialized_property output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/azure_mgmt_network/models/inbound_nat_pool_properties_format.rb', line 65 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.protocol output_object['protocol'] = serialized_property unless serialized_property.nil? serialized_property = object.frontend_port_range_start output_object['frontendPortRangeStart'] = serialized_property unless serialized_property.nil? serialized_property = object.frontend_port_range_end output_object['frontendPortRangeEnd'] = serialized_property unless serialized_property.nil? serialized_property = object.backend_port output_object['backendPort'] = serialized_property unless serialized_property.nil? serialized_property = object.frontend_ipconfiguration unless serialized_property.nil? serialized_property = MsRestAzure::SubResource.serialize_object(serialized_property) end output_object['frontendIPConfiguration'] = serialized_property unless serialized_property.nil? serialized_property = object.provisioning_state output_object['provisioningState'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
52 53 54 55 56 57 58 |
# File 'lib/azure_mgmt_network/models/inbound_nat_pool_properties_format.rb', line 52 def validate fail MsRest::ValidationError, 'property protocol is nil' if @protocol.nil? fail MsRest::ValidationError, 'property frontend_port_range_start is nil' if @frontend_port_range_start.nil? fail MsRest::ValidationError, 'property frontend_port_range_end is nil' if @frontend_port_range_end.nil? fail MsRest::ValidationError, 'property backend_port is nil' if @backend_port.nil? @frontend_ipconfiguration.validate unless @frontend_ipconfiguration.nil? end |