Class: Azure::ARM::Network::Models::OutboundNatRulePropertiesFormat

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/azure_mgmt_network/models/outbound_nat_rule_properties_format.rb

Overview

Outbound NAT pool of the loadbalancer

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#allocated_outbound_portsInteger

for SNAT

Returns:

  • (Integer)

    Gets or sets the number of outbound ports to be used



17
18
19
# File 'lib/azure_mgmt_network/models/outbound_nat_rule_properties_format.rb', line 17

def allocated_outbound_ports
  @allocated_outbound_ports
end

#backend_address_poolSubResource

Outbound traffic is randomly load balanced across IPs in the backend IPs

Returns:

  • (SubResource)

    Gets or sets a reference to a pool of DIPs.



26
27
28
# File 'lib/azure_mgmt_network/models/outbound_nat_rule_properties_format.rb', line 26

def backend_address_pool
  @backend_address_pool
end

#frontend_ipconfigurationsArray<SubResource>

load balancer

Returns:

  • (Array<SubResource>)

    Gets or sets Frontend IP addresses of the



21
22
23
# File 'lib/azure_mgmt_network/models/outbound_nat_rule_properties_format.rb', line 21

def frontend_ipconfigurations
  @frontend_ipconfigurations
end

#provisioning_stateString

resource Updating/Deleting/Failed

Returns:

  • (String)

    Gets or sets Provisioning state of the PublicIP



30
31
32
# File 'lib/azure_mgmt_network/models/outbound_nat_rule_properties_format.rb', line 30

def provisioning_state
  @provisioning_state
end

Class Method Details

.deserialize_object(object) ⇒ OutboundNatRulePropertiesFormat

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/azure_mgmt_network/models/outbound_nat_rule_properties_format.rb', line 83

def self.deserialize_object(object)
  return if object.nil?
  output_object = OutboundNatRulePropertiesFormat.new

  deserialized_property = object['backendAddressPool']
  unless deserialized_property.nil?
    deserialized_property = MsRestAzure::SubResource.deserialize_object(deserialized_property)
  end
  output_object.backend_address_pool = deserialized_property

  deserialized_property = object['allocatedOutboundPorts']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.allocated_outbound_ports = deserialized_property

  deserialized_property = object['frontendIPConfigurations']
  unless deserialized_property.nil?
    deserialized_array = []
    deserialized_property.each do |element1|
      unless element1.nil?
        element1 = MsRestAzure::SubResource.deserialize_object(element1)
      end
      deserialized_array.push(element1)
    end
    deserialized_property = deserialized_array
  end
  output_object.frontend_ipconfigurations = 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.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of Ruby Hash.



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/azure_mgmt_network/models/outbound_nat_rule_properties_format.rb', line 46

def self.serialize_object(object)
  object.validate
  output_object = {}

  serialized_property = object.backend_address_pool
  unless serialized_property.nil?
    serialized_property = MsRestAzure::SubResource.serialize_object(serialized_property)
  end
  output_object['backendAddressPool'] = serialized_property unless serialized_property.nil?

  serialized_property = object.allocated_outbound_ports
  output_object['allocatedOutboundPorts'] = serialized_property unless serialized_property.nil?

  serialized_property = object.frontend_ipconfigurations
  unless serialized_property.nil?
    serializedArray = []
    serialized_property.each do |element|
      unless element.nil?
        element = MsRestAzure::SubResource.serialize_object(element)
      end
      serializedArray.push(element)
    end
    serialized_property = serializedArray
  end
  output_object['frontendIPConfigurations'] = 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

#validateObject

Validate the object. Throws ValidationError if validation fails.



35
36
37
38
39
# File 'lib/azure_mgmt_network/models/outbound_nat_rule_properties_format.rb', line 35

def validate
  fail MsRest::ValidationError, 'property backend_address_pool is nil' if @backend_address_pool.nil?
  @frontend_ipconfigurations.each{ |e| e.validate if e.respond_to?(:validate) } unless @frontend_ipconfigurations.nil?
  @backend_address_pool.validate unless @backend_address_pool.nil?
end