Class: Azure::ARM::Network::Models::RoutePropertiesFormat
- Inherits:
-
Object
- Object
- Azure::ARM::Network::Models::RoutePropertiesFormat
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_network/models/route_properties_format.rb
Overview
Route resource
Instance Attribute Summary collapse
-
#address_prefix ⇒ String
applies.
-
#next_hop_ip_address ⇒ String
forwarded to.
-
#next_hop_type ⇒ RouteNextHopType
packet should be sent to.
-
#provisioning_state ⇒ String
Updating/Deleting/Failed.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ RoutePropertiesFormat
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
#address_prefix ⇒ String
applies.
17 18 19 |
# File 'lib/azure_mgmt_network/models/route_properties_format.rb', line 17 def address_prefix @address_prefix end |
#next_hop_ip_address ⇒ String
forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
28 29 30 |
# File 'lib/azure_mgmt_network/models/route_properties_format.rb', line 28 def next_hop_ip_address @next_hop_ip_address end |
#next_hop_type ⇒ RouteNextHopType
packet should be sent to. Possible values include: ‘VirtualNetworkGateway’, ‘VnetLocal’, ‘Internet’, ‘VirtualAppliance’, ‘None’
23 24 25 |
# File 'lib/azure_mgmt_network/models/route_properties_format.rb', line 23 def next_hop_type @next_hop_type end |
#provisioning_state ⇒ String
Updating/Deleting/Failed
32 33 34 |
# File 'lib/azure_mgmt_network/models/route_properties_format.rb', line 32 def provisioning_state @provisioning_state end |
Class Method Details
.deserialize_object(object) ⇒ RoutePropertiesFormat
Deserializes given Ruby Hash into Model object.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/azure_mgmt_network/models/route_properties_format.rb', line 70 def self.deserialize_object(object) return if object.nil? output_object = RoutePropertiesFormat.new deserialized_property = object['nextHopType'] if (!deserialized_property.nil? && !deserialized_property.empty?) enum_is_valid = RouteNextHopType.constants.any? { |e| RouteNextHopType.const_get(e).to_s.downcase == deserialized_property.downcase } warn 'Enum RouteNextHopType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid end output_object.next_hop_type = deserialized_property deserialized_property = object['addressPrefix'] output_object.address_prefix = deserialized_property deserialized_property = object['nextHopIpAddress'] output_object.next_hop_ip_address = 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.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/azure_mgmt_network/models/route_properties_format.rb', line 46 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.next_hop_type output_object['nextHopType'] = serialized_property unless serialized_property.nil? serialized_property = object.address_prefix output_object['addressPrefix'] = serialized_property unless serialized_property.nil? serialized_property = object.next_hop_ip_address output_object['nextHopIpAddress'] = 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/route_properties_format.rb', line 37 def validate fail MsRest::ValidationError, 'property next_hop_type is nil' if @next_hop_type.nil? end |