Class: Azure::ARM::Network::Models::VirtualNetworkGatewayPropertiesFormat

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

Overview

VirtualNeworkGateay properties

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#enable_bgpBoolean

Returns EnableBgp Flag.

Returns:

  • (Boolean)

    EnableBgp Flag



28
29
30
# File 'lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb', line 28

def enable_bgp
  @enable_bgp
end

#gateway_default_siteSubResource

LocalNetworkGateway resource which represents Local network site having default routes. Assign Null value in case of removing existing default site setting.

Returns:

  • (SubResource)

    Gets or sets the reference of the



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

def gateway_default_site
  @gateway_default_site
end

#gateway_typeVirtualNetworkGatewayType

gateway. Possible values include: ‘Vpn’, ‘ExpressRoute’

Returns:



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

def gateway_type
  @gateway_type
end

#ip_configurationsArray<VirtualNetworkGatewayIPConfiguration>

for Virtual network gateway.

Returns:



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

def ip_configurations
  @ip_configurations
end

#provisioning_stateString

VirtualNetworkGateway resource Updating/Deleting/Failed

Returns:

  • (String)

    Gets or sets Provisioning state of the



52
53
54
# File 'lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb', line 52

def provisioning_state
  @provisioning_state
end

#resource_guidString

VirtualNetworkGateway resource

Returns:

  • (String)

    Gets or sets resource guid property of the



48
49
50
# File 'lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb', line 48

def resource_guid
  @resource_guid
end

#skuVirtualNetworkGatewaySku

VirtualNetworkGatewaySku resource which represents the sku selected for Virtual network gateway.

Returns:



39
40
41
# File 'lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb', line 39

def sku
  @sku
end

#vpn_client_configurationVpnClientConfiguration

VpnClientConfiguration resource which represents the P2S VpnClient configurations.

Returns:



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

def vpn_client_configuration
  @vpn_client_configuration
end

#vpn_typeVpnType

values include: ‘PolicyBased’, ‘RouteBased’

Returns:

  • (VpnType)

    The type of this virtual network gateway. Possible



25
26
27
# File 'lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb', line 25

def vpn_type
  @vpn_type
end

Class Method Details

.deserialize_object(object) ⇒ VirtualNetworkGatewayPropertiesFormat

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb', line 127

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

  deserialized_property = object['ipConfigurations']
  unless deserialized_property.nil?
    deserialized_array = []
    deserialized_property.each do |element1|
      unless element1.nil?
        element1 = VirtualNetworkGatewayIPConfiguration.deserialize_object(element1)
      end
      deserialized_array.push(element1)
    end
    deserialized_property = deserialized_array
  end
  output_object.ip_configurations = deserialized_property

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

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

  deserialized_property = object['enableBgp']
  output_object.enable_bgp = deserialized_property

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

  deserialized_property = object['sku']
  unless deserialized_property.nil?
    deserialized_property = VirtualNetworkGatewaySku.deserialize_object(deserialized_property)
  end
  output_object.sku = deserialized_property

  deserialized_property = object['vpnClientConfiguration']
  unless deserialized_property.nil?
    deserialized_property = VpnClientConfiguration.deserialize_object(deserialized_property)
  end
  output_object.vpn_client_configuration = 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.



69
70
71
72
73
74
75
76
77
78
79
80
81
82
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
115
116
117
118
119
120
# File 'lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb', line 69

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

  serialized_property = object.ip_configurations
  unless serialized_property.nil?
    serializedArray = []
    serialized_property.each do |element|
      unless element.nil?
        element = VirtualNetworkGatewayIPConfiguration.serialize_object(element)
      end
      serializedArray.push(element)
    end
    serialized_property = serializedArray
  end
  output_object['ipConfigurations'] = serialized_property unless serialized_property.nil?

  serialized_property = object.gateway_type
  output_object['gatewayType'] = serialized_property unless serialized_property.nil?

  serialized_property = object.vpn_type
  output_object['vpnType'] = serialized_property unless serialized_property.nil?

  serialized_property = object.enable_bgp
  output_object['enableBgp'] = serialized_property unless serialized_property.nil?

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

  serialized_property = object.sku
  unless serialized_property.nil?
    serialized_property = VirtualNetworkGatewaySku.serialize_object(serialized_property)
  end
  output_object['sku'] = serialized_property unless serialized_property.nil?

  serialized_property = object.vpn_client_configuration
  unless serialized_property.nil?
    serialized_property = VpnClientConfiguration.serialize_object(serialized_property)
  end
  output_object['vpnClientConfiguration'] = 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.



57
58
59
60
61
62
# File 'lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb', line 57

def validate
  @ip_configurations.each{ |e| e.validate if e.respond_to?(:validate) } unless @ip_configurations.nil?
  @gateway_default_site.validate unless @gateway_default_site.nil?
  @sku.validate unless @sku.nil?
  @vpn_client_configuration.validate unless @vpn_client_configuration.nil?
end