Class: Azure::ARM::Network::Models::VirtualNetworkGatewayPropertiesFormat
- Inherits:
-
Object
- Object
- Azure::ARM::Network::Models::VirtualNetworkGatewayPropertiesFormat
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb
Overview
VirtualNeworkGateay properties
Instance Attribute Summary collapse
-
#enable_bgp ⇒ Boolean
EnableBgp Flag.
-
#gateway_default_site ⇒ SubResource
LocalNetworkGateway resource which represents Local network site having default routes.
-
#gateway_type ⇒ VirtualNetworkGatewayType
gateway.
-
#ip_configurations ⇒ Array<VirtualNetworkGatewayIPConfiguration>
for Virtual network gateway.
-
#provisioning_state ⇒ String
VirtualNetworkGateway resource Updating/Deleting/Failed.
-
#resource_guid ⇒ String
VirtualNetworkGateway resource.
-
#sku ⇒ VirtualNetworkGatewaySku
VirtualNetworkGatewaySku resource which represents the sku selected for Virtual network gateway.
-
#vpn_client_configuration ⇒ VpnClientConfiguration
VpnClientConfiguration resource which represents the P2S VpnClient configurations.
-
#vpn_type ⇒ VpnType
values include: ‘PolicyBased’, ‘RouteBased’.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ VirtualNetworkGatewayPropertiesFormat
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
#enable_bgp ⇒ Boolean
Returns 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_site ⇒ SubResource
LocalNetworkGateway resource which represents Local network site having default routes. Assign Null value in case of removing existing default site setting.
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_type ⇒ VirtualNetworkGatewayType
gateway. Possible values include: ‘Vpn’, ‘ExpressRoute’
21 22 23 |
# File 'lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb', line 21 def gateway_type @gateway_type end |
#ip_configurations ⇒ Array<VirtualNetworkGatewayIPConfiguration>
for Virtual network gateway.
17 18 19 |
# File 'lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb', line 17 def ip_configurations @ip_configurations end |
#provisioning_state ⇒ String
VirtualNetworkGateway resource Updating/Deleting/Failed
52 53 54 |
# File 'lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb', line 52 def provisioning_state @provisioning_state end |
#resource_guid ⇒ String
VirtualNetworkGateway resource
48 49 50 |
# File 'lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb', line 48 def resource_guid @resource_guid end |
#sku ⇒ VirtualNetworkGatewaySku
VirtualNetworkGatewaySku resource which represents the sku selected for Virtual network gateway.
39 40 41 |
# File 'lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb', line 39 def sku @sku end |
#vpn_client_configuration ⇒ VpnClientConfiguration
VpnClientConfiguration resource which represents the P2S VpnClient configurations.
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_type ⇒ VpnType
values include: ‘PolicyBased’, ‘RouteBased’
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.
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.
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
#validate ⇒ Object
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 |