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_type ⇒ VirtualNetworkGatewayType
gateway.
-
#ip_configurations ⇒ Array<VirtualNetworkGatewayIpConfiguration>
for Virtual network gateway.
-
#provisioning_state ⇒ String
VirtualNetworkGateway resource Updating/Deleting/Failed.
-
#vpn_type ⇒ VpnType
values for this property 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_type ⇒ VirtualNetworkGatewayType
gateway. Possible values for this property include: ‘Vpn’.
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
32 33 34 |
# File 'lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb', line 32 def provisioning_state @provisioning_state end |
#vpn_type ⇒ VpnType
values for this property 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.
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 121 122 123 |
# File 'lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb', line 83 def self.deserialize_object(object) return if object.nil? output_object = VirtualNetworkGatewayPropertiesFormat.new deserialized_property = object['ipConfigurations'] unless deserialized_property.nil? deserializedArray = []; deserialized_property.each do |element1| unless element1.nil? element1 = VirtualNetworkGatewayIpConfiguration.deserialize_object(element1) end deserializedArray.push(element1); end deserialized_property = deserializedArray; 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 } fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) 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 } fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid end output_object.vpn_type = deserialized_property deserialized_property = object['enableBgp'] output_object.enable_bgp = 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.
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/virtual_network_gateway_properties_format.rb', line 46 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.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.
37 38 39 |
# File 'lib/azure_mgmt_network/models/virtual_network_gateway_properties_format.rb', line 37 def validate @ip_configurations.each{ |e| e.validate if e.respond_to?(:validate) } unless @ip_configurations.nil? end |