Class: Azure::ARM::Network::Models::ExpressRouteCircuitRoutesTable

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

Overview

The routes table associated with the ExpressRouteCircuit

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#address_prefixString

Returns Gets AddressPrefix.

Returns:

  • (String)

    Gets AddressPrefix.



16
17
18
# File 'lib/azure_mgmt_network/models/express_route_circuit_routes_table.rb', line 16

def address_prefix
  @address_prefix
end

#as_pathString

Returns Gets AsPath.

Returns:

  • (String)

    Gets AsPath.



27
28
29
# File 'lib/azure_mgmt_network/models/express_route_circuit_routes_table.rb', line 27

def as_path
  @as_path
end

#next_hop_ipString

Returns Gets NextHopIP.

Returns:

  • (String)

    Gets NextHopIP.



24
25
26
# File 'lib/azure_mgmt_network/models/express_route_circuit_routes_table.rb', line 24

def next_hop_ip
  @next_hop_ip
end

#next_hop_typeRouteNextHopType

‘VirtualNetworkGateway’, ‘VnetLocal’, ‘Internet’, ‘VirtualAppliance’, ‘None’

Returns:



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

def next_hop_type
  @next_hop_type
end

Class Method Details

.deserialize_object(object) ⇒ ExpressRouteCircuitRoutesTable

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/azure_mgmt_network/models/express_route_circuit_routes_table.rb', line 65

def self.deserialize_object(object)
  return if object.nil?
  output_object = ExpressRouteCircuitRoutesTable.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['nextHopIP']
  output_object.next_hop_ip = deserialized_property

  deserialized_property = object['asPath']
  output_object.as_path = 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.



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/azure_mgmt_network/models/express_route_circuit_routes_table.rb', line 41

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
  output_object['nextHopIP'] = serialized_property unless serialized_property.nil?

  serialized_property = object.as_path
  output_object['asPath'] = serialized_property unless serialized_property.nil?

  output_object
end

Instance Method Details

#validateObject

Validate the object. Throws ValidationError if validation fails.



32
33
34
# File 'lib/azure_mgmt_network/models/express_route_circuit_routes_table.rb', line 32

def validate
  fail MsRest::ValidationError, 'property next_hop_type is nil' if @next_hop_type.nil?
end