Class: Azure::ARM::Network::Models::ExpressRouteCircuitPeeringPropertiesFormat

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

Overview

Model object.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#azure_asnInteger

Returns Gets or sets the azure ASN.

Returns:

  • (Integer)

    Gets or sets the azure ASN



25
26
27
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_properties_format.rb', line 25

def azure_asn
  @azure_asn
end

#microsoft_peering_configExpressRouteCircuitPeeringConfig

peering config

Returns:



50
51
52
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_properties_format.rb', line 50

def microsoft_peering_config
  @microsoft_peering_config
end

#peer_asnInteger

Returns Gets or sets the peer ASN.

Returns:

  • (Integer)

    Gets or sets the peer ASN



28
29
30
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_properties_format.rb', line 28

def peer_asn
  @peer_asn
end

#peering_typeExpressRouteCircuitPeeringType

Possible values include: ‘AzurePublicPeering’, ‘AzurePrivatePeering’, ‘MicrosoftPeering’

Returns:



18
19
20
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_properties_format.rb', line 18

def peering_type
  @peering_type
end

#primary_azure_portString

Returns Gets or sets the primary port.

Returns:

  • (String)

    Gets or sets the primary port



37
38
39
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_properties_format.rb', line 37

def primary_azure_port
  @primary_azure_port
end

#primary_peer_address_prefixString

Returns Gets or sets the primary address prefix.

Returns:

  • (String)

    Gets or sets the primary address prefix



31
32
33
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_properties_format.rb', line 31

def primary_peer_address_prefix
  @primary_peer_address_prefix
end

#provisioning_stateString

resource Updating/Deleting/Failed

Returns:

  • (String)

    Gets or sets Provisioning state of the PublicIP



57
58
59
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_properties_format.rb', line 57

def provisioning_state
  @provisioning_state
end

#secondary_azure_portString

Returns Gets or sets the secondary port.

Returns:

  • (String)

    Gets or sets the secondary port



40
41
42
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_properties_format.rb', line 40

def secondary_azure_port
  @secondary_azure_port
end

#secondary_peer_address_prefixString

Returns Gets or sets the secondary address prefix.

Returns:

  • (String)

    Gets or sets the secondary address prefix



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

def secondary_peer_address_prefix
  @secondary_peer_address_prefix
end

#shared_keyString

Returns Gets or sets the shared key.

Returns:

  • (String)

    Gets or sets the shared key



43
44
45
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_properties_format.rb', line 43

def shared_key
  @shared_key
end

#stateExpressRouteCircuitPeeringState

Peering. Possible values include: ‘Disabled’, ‘Enabled’

Returns:



22
23
24
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_properties_format.rb', line 22

def state
  @state
end

#statsExpressRouteCircuitStats

Returns Gets or peering stats.

Returns:



53
54
55
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_properties_format.rb', line 53

def stats
  @stats
end

#vlan_idInteger

Returns Gets or sets the vlan id.

Returns:

  • (Integer)

    Gets or sets the vlan id



46
47
48
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_properties_format.rb', line 46

def vlan_id
  @vlan_id
end

Class Method Details

.deserialize_object(object) ⇒ ExpressRouteCircuitPeeringPropertiesFormat

Deserializes given Ruby Hash into Model object. object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_properties_format.rb', line 130

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

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

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

  deserialized_property = object['azureASN']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.azure_asn = deserialized_property

  deserialized_property = object['peerASN']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.peer_asn = deserialized_property

  deserialized_property = object['primaryPeerAddressPrefix']
  output_object.primary_peer_address_prefix = deserialized_property

  deserialized_property = object['secondaryPeerAddressPrefix']
  output_object.secondary_peer_address_prefix = deserialized_property

  deserialized_property = object['primaryAzurePort']
  output_object.primary_azure_port = deserialized_property

  deserialized_property = object['secondaryAzurePort']
  output_object.secondary_azure_port = deserialized_property

  deserialized_property = object['sharedKey']
  output_object.shared_key = deserialized_property

  deserialized_property = object['vlanId']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.vlan_id = deserialized_property

  deserialized_property = object['microsoftPeeringConfig']
  unless deserialized_property.nil?
    deserialized_property = ExpressRouteCircuitPeeringConfig.deserialize_object(deserialized_property)
  end
  output_object.microsoft_peering_config = deserialized_property

  deserialized_property = object['stats']
  unless deserialized_property.nil?
    deserialized_property = ExpressRouteCircuitStats.deserialize_object(deserialized_property)
  end
  output_object.stats = 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.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of Ruby Hash.



72
73
74
75
76
77
78
79
80
81
82
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
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_properties_format.rb', line 72

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

  serialized_property = object.peering_type
  output_object['peeringType'] = serialized_property unless serialized_property.nil?

  serialized_property = object.state
  output_object['state'] = serialized_property unless serialized_property.nil?

  serialized_property = object.azure_asn
  output_object['azureASN'] = serialized_property unless serialized_property.nil?

  serialized_property = object.peer_asn
  output_object['peerASN'] = serialized_property unless serialized_property.nil?

  serialized_property = object.primary_peer_address_prefix
  output_object['primaryPeerAddressPrefix'] = serialized_property unless serialized_property.nil?

  serialized_property = object.secondary_peer_address_prefix
  output_object['secondaryPeerAddressPrefix'] = serialized_property unless serialized_property.nil?

  serialized_property = object.primary_azure_port
  output_object['primaryAzurePort'] = serialized_property unless serialized_property.nil?

  serialized_property = object.secondary_azure_port
  output_object['secondaryAzurePort'] = serialized_property unless serialized_property.nil?

  serialized_property = object.shared_key
  output_object['sharedKey'] = serialized_property unless serialized_property.nil?

  serialized_property = object.vlan_id
  output_object['vlanId'] = serialized_property unless serialized_property.nil?

  serialized_property = object.microsoft_peering_config
  unless serialized_property.nil?
    serialized_property = ExpressRouteCircuitPeeringConfig.serialize_object(serialized_property)
  end
  output_object['microsoftPeeringConfig'] = serialized_property unless serialized_property.nil?

  serialized_property = object.stats
  unless serialized_property.nil?
    serialized_property = ExpressRouteCircuitStats.serialize_object(serialized_property)
  end
  output_object['stats'] = 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

#validateObject

Validate the object. Throws ValidationError if validation fails.



62
63
64
65
# File 'lib/azure_mgmt_network/models/express_route_circuit_peering_properties_format.rb', line 62

def validate
  @microsoft_peering_config.validate unless @microsoft_peering_config.nil?
  @stats.validate unless @stats.nil?
end