Class: Azure::ARM::Network::Models::VirtualNetworkGatewayConnectionPropertiesFormat
- Inherits:
-
Object
- Object
- Azure::ARM::Network::Models::VirtualNetworkGatewayConnectionPropertiesFormat
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_network/Models/virtual_network_gateway_connection_properties_format.rb
Overview
VirtualNeworkGatewayConnection properties
Instance Attribute Summary collapse
-
#connection_type ⇒ VirtualNetworkGatewayConnectionType
-Ipsec/Dedicated/VpnClient/Vnet2Vnet.
- #local_network_gateway2 ⇒ LocalNetworkGateway
-
#provisioning_state ⇒ String
VirtualNetworkGatewayConnection resource Updating/Deleting/Failed.
-
#routing_weight ⇒ Integer
The Routing weight.
-
#shared_key ⇒ String
The Ipsec share key.
- #virtual_network_gateway1 ⇒ VirtualNetworkGateway
- #virtual_network_gateway2 ⇒ VirtualNetworkGateway
Class Method Summary collapse
-
.deserialize_object(object) ⇒ VirtualNetworkGatewayConnectionPropertiesFormat
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
#connection_type ⇒ VirtualNetworkGatewayConnectionType
-Ipsec/Dedicated/VpnClient/Vnet2Vnet. Possible values for this property include: ‘IPsec’, ‘Vnet2Vnet’, ‘ExpressRoute’, ‘VPNClient’.
27 28 29 |
# File 'lib/azure_mgmt_network/Models/virtual_network_gateway_connection_properties_format.rb', line 27 def connection_type @connection_type end |
#local_network_gateway2 ⇒ LocalNetworkGateway
22 23 24 |
# File 'lib/azure_mgmt_network/Models/virtual_network_gateway_connection_properties_format.rb', line 22 def local_network_gateway2 @local_network_gateway2 end |
#provisioning_state ⇒ String
VirtualNetworkGatewayConnection resource Updating/Deleting/Failed
37 38 39 |
# File 'lib/azure_mgmt_network/Models/virtual_network_gateway_connection_properties_format.rb', line 37 def provisioning_state @provisioning_state end |
#routing_weight ⇒ Integer
Returns The Routing weight.
30 31 32 |
# File 'lib/azure_mgmt_network/Models/virtual_network_gateway_connection_properties_format.rb', line 30 def routing_weight @routing_weight end |
#shared_key ⇒ String
Returns The Ipsec share key.
33 34 35 |
# File 'lib/azure_mgmt_network/Models/virtual_network_gateway_connection_properties_format.rb', line 33 def shared_key @shared_key end |
#virtual_network_gateway1 ⇒ VirtualNetworkGateway
16 17 18 |
# File 'lib/azure_mgmt_network/Models/virtual_network_gateway_connection_properties_format.rb', line 16 def virtual_network_gateway1 @virtual_network_gateway1 end |
#virtual_network_gateway2 ⇒ VirtualNetworkGateway
19 20 21 |
# File 'lib/azure_mgmt_network/Models/virtual_network_gateway_connection_properties_format.rb', line 19 def virtual_network_gateway2 @virtual_network_gateway2 end |
Class Method Details
.deserialize_object(object) ⇒ VirtualNetworkGatewayConnectionPropertiesFormat
Deserializes given Ruby Hash into Model object. object.
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 130 131 132 133 134 135 136 137 138 |
# File 'lib/azure_mgmt_network/Models/virtual_network_gateway_connection_properties_format.rb', line 96 def self.deserialize_object(object) return if object.nil? output_object = VirtualNetworkGatewayConnectionPropertiesFormat.new deserialized_property = object['virtualNetworkGateway1'] unless deserialized_property.nil? deserialized_property = VirtualNetworkGateway.deserialize_object(deserialized_property) end output_object.virtual_network_gateway1 = deserialized_property deserialized_property = object['virtualNetworkGateway2'] unless deserialized_property.nil? deserialized_property = VirtualNetworkGateway.deserialize_object(deserialized_property) end output_object.virtual_network_gateway2 = deserialized_property deserialized_property = object['localNetworkGateway2'] unless deserialized_property.nil? deserialized_property = LocalNetworkGateway.deserialize_object(deserialized_property) end output_object.local_network_gateway2 = deserialized_property deserialized_property = object['connectionType'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = VirtualNetworkGatewayConnectionType.constants.any? { |e| VirtualNetworkGatewayConnectionType.const_get(e).to_s.downcase == deserialized_property.downcase } fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid end output_object.connection_type = deserialized_property deserialized_property = object['routingWeight'] deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty? output_object.routing_weight = deserialized_property deserialized_property = object['sharedKey'] output_object.shared_key = deserialized_property deserialized_property = object['provisioningState'] output_object.provisioning_state = deserialized_property output_object.validate output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into 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 86 87 88 |
# File 'lib/azure_mgmt_network/Models/virtual_network_gateway_connection_properties_format.rb', line 53 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.virtual_network_gateway1 unless serialized_property.nil? serialized_property = VirtualNetworkGateway.serialize_object(serialized_property) end output_object['virtualNetworkGateway1'] = serialized_property unless serialized_property.nil? serialized_property = object.virtual_network_gateway2 unless serialized_property.nil? serialized_property = VirtualNetworkGateway.serialize_object(serialized_property) end output_object['virtualNetworkGateway2'] = serialized_property unless serialized_property.nil? serialized_property = object.local_network_gateway2 unless serialized_property.nil? serialized_property = LocalNetworkGateway.serialize_object(serialized_property) end output_object['localNetworkGateway2'] = serialized_property unless serialized_property.nil? serialized_property = object.connection_type output_object['connectionType'] = serialized_property unless serialized_property.nil? serialized_property = object.routing_weight output_object['routingWeight'] = serialized_property unless serialized_property.nil? serialized_property = object.shared_key output_object['sharedKey'] = 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.
42 43 44 45 46 |
# File 'lib/azure_mgmt_network/Models/virtual_network_gateway_connection_properties_format.rb', line 42 def validate @virtual_network_gateway1.validate unless @virtual_network_gateway1.nil? @virtual_network_gateway2.validate unless @virtual_network_gateway2.nil? @local_network_gateway2.validate unless @local_network_gateway2.nil? end |