Class: Azure::ARM::Network::Models::ExpressRouteCircuitPeeringConfig

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

Overview

Specfies the peering config

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#advertised_public_prefixesArray<String>

AdvertisedPublicPrefixes

Returns:

  • (Array<String>)

    Gets or sets the reference of



17
18
19
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_config.rb', line 17

def advertised_public_prefixes
  @advertised_public_prefixes
end

#advertised_public_prefixes_stateExpressRouteCircuitPeeringAdvertisedPublicPrefixState

or sets AdvertisedPublicPrefixState of the Peering resource . Possible values include: ‘NotConfigured’, ‘Configuring’, ‘Configured’, ‘ValidationNeeded’



23
24
25
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_config.rb', line 23

def advertised_public_prefixes_state
  @advertised_public_prefixes_state
end

#customer_asnInteger

Returns Gets or Sets CustomerAsn of the peering.

Returns:

  • (Integer)

    Gets or Sets CustomerAsn of the peering.



26
27
28
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_config.rb', line 26

def customer_asn
  @customer_asn
end

#routing_registry_nameString

Returns Gets or Sets RoutingRegistryName of the config.

Returns:

  • (String)

    Gets or Sets RoutingRegistryName of the config.



29
30
31
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_config.rb', line 29

def routing_registry_name
  @routing_registry_name
end

Class Method Details

.deserialize_object(object) ⇒ ExpressRouteCircuitPeeringConfig

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



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

def self.deserialize_object(object)
  return if object.nil?
  output_object = ExpressRouteCircuitPeeringConfig.new

  deserialized_property = object['advertisedPublicPrefixes']
  output_object.advertised_public_prefixes = deserialized_property

  deserialized_property = object['advertisedPublicPrefixesState']
  if (!deserialized_property.nil? && !deserialized_property.empty?)
    enum_is_valid = ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.constants.any? { |e| ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.const_get(e).to_s.downcase == deserialized_property.downcase }
    warn 'Enum ExpressRouteCircuitPeeringAdvertisedPublicPrefixState does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
  end
  output_object.advertised_public_prefixes_state = deserialized_property

  deserialized_property = object['customerASN']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.customer_asn = deserialized_property

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



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

def self.serialize_object(object)
  object.validate
  output_object = {}

  serialized_property = object.advertised_public_prefixes
  output_object['advertisedPublicPrefixes'] = serialized_property unless serialized_property.nil?

  serialized_property = object.advertised_public_prefixes_state
  output_object['advertisedPublicPrefixesState'] = serialized_property unless serialized_property.nil?

  serialized_property = object.customer_asn
  output_object['customerASN'] = serialized_property unless serialized_property.nil?

  serialized_property = object.routing_registry_name
  output_object['routingRegistryName'] = serialized_property unless serialized_property.nil?

  output_object
end

Instance Method Details

#validateObject

Validate the object. Throws ValidationError if validation fails.



34
35
36
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_config.rb', line 34

def validate
  @advertised_public_prefixes.each{ |e| e.validate if e.respond_to?(:validate) } unless @advertised_public_prefixes.nil?
end