Class: Azure::ARM::Network::Models::PublicIPAddressPropertiesFormat

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

Overview

PublicIpAddress properties

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dns_settingsPublicIPAddressDnsSettings

record associated with the public IP address

Returns:



24
25
26
# File 'lib/azure_mgmt_network/models/public_ipaddress_properties_format.rb', line 24

def dns_settings
  @dns_settings
end

#idle_timeout_in_minutesInteger

Returns Gets or sets the Idletimeout of the public IP address.

Returns:

  • (Integer)

    Gets or sets the Idletimeout of the public IP address



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

def idle_timeout_in_minutes
  @idle_timeout_in_minutes
end

#ip_addressString

Returns:

  • (String)


27
28
29
# File 'lib/azure_mgmt_network/models/public_ipaddress_properties_format.rb', line 27

def ip_address
  @ip_address
end

#ip_configurationIPConfiguration

Returns:



20
21
22
# File 'lib/azure_mgmt_network/models/public_ipaddress_properties_format.rb', line 20

def ip_configuration
  @ip_configuration
end

#provisioning_stateString

resource Updating/Deleting/Failed

Returns:

  • (String)

    Gets or sets Provisioning state of the PublicIP



38
39
40
# File 'lib/azure_mgmt_network/models/public_ipaddress_properties_format.rb', line 38

def provisioning_state
  @provisioning_state
end

#public_ipallocation_methodIPAllocationMethod

(Static/Dynamic). Possible values include: ‘Static’, ‘Dynamic’

Returns:



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

def public_ipallocation_method
  @public_ipallocation_method
end

#resource_guidString

resource

Returns:

  • (String)

    Gets or sets resource guid property of the PublicIP



34
35
36
# File 'lib/azure_mgmt_network/models/public_ipaddress_properties_format.rb', line 34

def resource_guid
  @resource_guid
end

Class Method Details

.deserialize_object(object) ⇒ PublicIPAddressPropertiesFormat

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



92
93
94
95
96
97
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
# File 'lib/azure_mgmt_network/models/public_ipaddress_properties_format.rb', line 92

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

  deserialized_property = object['publicIPAllocationMethod']
  if (!deserialized_property.nil? && !deserialized_property.empty?)
    enum_is_valid = IPAllocationMethod.constants.any? { |e| IPAllocationMethod.const_get(e).to_s.downcase == deserialized_property.downcase }
    warn 'Enum IPAllocationMethod does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
  end
  output_object.public_ipallocation_method = deserialized_property

  deserialized_property = object['ipConfiguration']
  unless deserialized_property.nil?
    deserialized_property = IPConfiguration.deserialize_object(deserialized_property)
  end
  output_object.ip_configuration = deserialized_property

  deserialized_property = object['dnsSettings']
  unless deserialized_property.nil?
    deserialized_property = PublicIPAddressDnsSettings.deserialize_object(deserialized_property)
  end
  output_object.dns_settings = deserialized_property

  deserialized_property = object['ipAddress']
  output_object.ip_address = deserialized_property

  deserialized_property = object['idleTimeoutInMinutes']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.idle_timeout_in_minutes = deserialized_property

  deserialized_property = object['resourceGuid']
  output_object.resource_guid = 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.



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/azure_mgmt_network/models/public_ipaddress_properties_format.rb', line 53

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

  serialized_property = object.public_ipallocation_method
  output_object['publicIPAllocationMethod'] = serialized_property unless serialized_property.nil?

  serialized_property = object.ip_configuration
  unless serialized_property.nil?
    serialized_property = IPConfiguration.serialize_object(serialized_property)
  end
  output_object['ipConfiguration'] = serialized_property unless serialized_property.nil?

  serialized_property = object.dns_settings
  unless serialized_property.nil?
    serialized_property = PublicIPAddressDnsSettings.serialize_object(serialized_property)
  end
  output_object['dnsSettings'] = serialized_property unless serialized_property.nil?

  serialized_property = object.ip_address
  output_object['ipAddress'] = serialized_property unless serialized_property.nil?

  serialized_property = object.idle_timeout_in_minutes
  output_object['idleTimeoutInMinutes'] = serialized_property unless serialized_property.nil?

  serialized_property = object.resource_guid
  output_object['resourceGuid'] = 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.



43
44
45
46
# File 'lib/azure_mgmt_network/models/public_ipaddress_properties_format.rb', line 43

def validate
  @ip_configuration.validate unless @ip_configuration.nil?
  @dns_settings.validate unless @dns_settings.nil?
end