oraclebmc 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -2
- data/lib/oraclebmc/core/blockstorage_client.rb +2 -2
- data/lib/oraclebmc/core/compute_client.rb +8 -7
- data/lib/oraclebmc/core/core.rb +17 -0
- data/lib/oraclebmc/core/models/create_cross_connect_details.rb +203 -0
- data/lib/oraclebmc/core/models/create_cross_connect_group_details.rb +132 -0
- data/lib/oraclebmc/core/models/create_subnet_details.rb +24 -3
- data/lib/oraclebmc/core/models/create_vcn_details.rb +2 -2
- data/lib/oraclebmc/core/models/create_virtual_circuit_details.rb +261 -0
- data/lib/oraclebmc/core/models/create_vnic_details.rb +202 -0
- data/lib/oraclebmc/core/models/cross_connect.rb +234 -0
- data/lib/oraclebmc/core/models/cross_connect_group.rb +187 -0
- data/lib/oraclebmc/core/models/cross_connect_location.rb +135 -0
- data/lib/oraclebmc/core/models/cross_connect_mapping.rb +191 -0
- data/lib/oraclebmc/core/models/cross_connect_port_speed_shape.rb +138 -0
- data/lib/oraclebmc/core/models/cross_connect_status.rb +201 -0
- data/lib/oraclebmc/core/models/dhcp_dns_option.rb +7 -7
- data/lib/oraclebmc/core/models/dhcp_option.rb +1 -1
- data/lib/oraclebmc/core/models/dhcp_search_domain_option.rb +6 -7
- data/lib/oraclebmc/core/models/fast_connect_provider_service.rb +146 -0
- data/lib/oraclebmc/core/models/image.rb +1 -1
- data/lib/oraclebmc/core/models/instance.rb +6 -7
- data/lib/oraclebmc/core/models/launch_instance_details.rb +22 -19
- data/lib/oraclebmc/core/models/letter_of_authority.rb +195 -0
- data/lib/oraclebmc/core/models/subnet.rb +26 -5
- data/lib/oraclebmc/core/models/update_cross_connect_details.rb +137 -0
- data/lib/oraclebmc/core/models/update_cross_connect_group_details.rb +121 -0
- data/lib/oraclebmc/core/models/update_virtual_circuit_details.rb +240 -0
- data/lib/oraclebmc/core/models/vcn.rb +4 -4
- data/lib/oraclebmc/core/models/virtual_circuit.rb +395 -0
- data/lib/oraclebmc/core/models/virtual_circuit_bandwidth_shape.rb +138 -0
- data/lib/oraclebmc/core/models/vnic.rb +4 -4
- data/lib/oraclebmc/core/virtual_network_client.rb +962 -85
- data/lib/oraclebmc/identity/identity.rb +13 -0
- data/lib/oraclebmc/identity/identity_client.rb +533 -8
- data/lib/oraclebmc/identity/models/create_identity_provider_details.rb +213 -0
- data/lib/oraclebmc/identity/models/create_idp_group_mapping_details.rb +134 -0
- data/lib/oraclebmc/identity/models/create_region_subscription_details.rb +128 -0
- data/lib/oraclebmc/identity/models/create_saml2_identity_provider_details.rb +155 -0
- data/lib/oraclebmc/identity/models/create_user_details.rb +1 -1
- data/lib/oraclebmc/identity/models/identity_provider.rb +257 -0
- data/lib/oraclebmc/identity/models/idp_group_mapping.rb +221 -0
- data/lib/oraclebmc/identity/models/region.rb +142 -0
- data/lib/oraclebmc/identity/models/region_subscription.rb +179 -0
- data/lib/oraclebmc/identity/models/saml2_identity_provider.rb +181 -0
- data/lib/oraclebmc/identity/models/tenancy.rb +159 -0
- data/lib/oraclebmc/identity/models/update_identity_provider_details.rb +161 -0
- data/lib/oraclebmc/identity/models/update_idp_group_mapping_details.rb +132 -0
- data/lib/oraclebmc/identity/models/update_saml2_identity_provider_details.rb +146 -0
- data/lib/oraclebmc/regions.rb +1 -1
- data/lib/oraclebmc/version.rb +1 -1
- metadata +32 -2
@@ -0,0 +1,191 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OracleBMC
|
6
|
+
class Core::Models::CrossConnectMapping
|
7
|
+
# The key for BGP MD5 authentication. Only applicable if your system
|
8
|
+
# requires MD5 authentication. If empty or not set (null), that
|
9
|
+
# means you don't use BGP MD5 authentication.
|
10
|
+
#
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :bgp_md5_auth_key
|
13
|
+
|
14
|
+
# The OCID of the cross-connect or cross-connect group for this mapping.
|
15
|
+
# Specified by the owner of the cross-connect or cross-connect group (the
|
16
|
+
# customer if the customer is colocated with Oracle; the provider if the
|
17
|
+
# customer is connecting via provider).
|
18
|
+
#
|
19
|
+
# @return [String]
|
20
|
+
attr_accessor :cross_connect_or_cross_connect_group_id
|
21
|
+
|
22
|
+
# The BGP IP address for the router on the other end of the BGP session from
|
23
|
+
# Oracle. Specified by the owner of that router. If the session goes from Oracle
|
24
|
+
# to a customer, this is the BGP IP address of the customer's edge router. If the
|
25
|
+
# session goes from Oracle to a provider, this is the BGP IP address of the
|
26
|
+
# provider's edge router. Must use a /30 or /31 subnet mask.
|
27
|
+
#
|
28
|
+
# Example: `10.0.0.18/31`
|
29
|
+
#
|
30
|
+
# @return [String]
|
31
|
+
attr_accessor :customer_bgp_peering_ip
|
32
|
+
|
33
|
+
# The IP address for Oracle's end of the BPG session. Must use a /30 or /31
|
34
|
+
# subnet mask. If the session goes from Oracle to a customer's edge router,
|
35
|
+
# the customer specifies this information. If the session goes from Oracle to
|
36
|
+
# a provider's edge router, the provider specifies this.
|
37
|
+
#
|
38
|
+
# Example: `10.0.0.19/31`
|
39
|
+
#
|
40
|
+
# @return [String]
|
41
|
+
attr_accessor :oracle_bgp_peering_ip
|
42
|
+
|
43
|
+
# The number of the specific VLAN (on the cross-connect or cross-connect group)
|
44
|
+
# that is assigned to this virtual circuit. Specified by the owner of the cross-connect
|
45
|
+
# or cross-connect group (the customer if the customer is colocated with Oracle, or
|
46
|
+
# the provider if the customer is connecting via provider).
|
47
|
+
#
|
48
|
+
# Example: `200`
|
49
|
+
#
|
50
|
+
# @return [Integer]
|
51
|
+
attr_accessor :vlan
|
52
|
+
|
53
|
+
|
54
|
+
# Initializes the object
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
56
|
+
def initialize(attributes = {})
|
57
|
+
return unless attributes.is_a?(Hash)
|
58
|
+
|
59
|
+
# convert string to symbol for hash key
|
60
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
61
|
+
|
62
|
+
|
63
|
+
if attributes[:'bgpMd5AuthKey']
|
64
|
+
self.bgp_md5_auth_key = attributes[:'bgpMd5AuthKey']
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes[:'crossConnectOrCrossConnectGroupId']
|
68
|
+
self.cross_connect_or_cross_connect_group_id = attributes[:'crossConnectOrCrossConnectGroupId']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes[:'customerBgpPeeringIp']
|
72
|
+
self.customer_bgp_peering_ip = attributes[:'customerBgpPeeringIp']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes[:'oracleBgpPeeringIp']
|
76
|
+
self.oracle_bgp_peering_ip = attributes[:'oracleBgpPeeringIp']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes[:'vlan']
|
80
|
+
self.vlan = attributes[:'vlan']
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
84
|
+
|
85
|
+
# Checks equality by comparing each attribute.
|
86
|
+
# @param [Object] other_object to be compared
|
87
|
+
def ==(other_object)
|
88
|
+
return true if self.equal?(other_object)
|
89
|
+
self.class == other_object.class &&
|
90
|
+
bgp_md5_auth_key == other_object.bgp_md5_auth_key &&
|
91
|
+
cross_connect_or_cross_connect_group_id == other_object.cross_connect_or_cross_connect_group_id &&
|
92
|
+
customer_bgp_peering_ip == other_object.customer_bgp_peering_ip &&
|
93
|
+
oracle_bgp_peering_ip == other_object.oracle_bgp_peering_ip &&
|
94
|
+
vlan == other_object.vlan
|
95
|
+
end
|
96
|
+
|
97
|
+
# @see the `==` method
|
98
|
+
# @param [Object] other_object to be compared
|
99
|
+
def eql?(other_object)
|
100
|
+
self == other_object
|
101
|
+
end
|
102
|
+
|
103
|
+
# Calculates hash code according to all attributes.
|
104
|
+
# @return [Fixnum] Hash code
|
105
|
+
def hash
|
106
|
+
[bgp_md5_auth_key, cross_connect_or_cross_connect_group_id, customer_bgp_peering_ip, oracle_bgp_peering_ip, vlan].hash
|
107
|
+
end
|
108
|
+
|
109
|
+
# Builds the object from hash
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
111
|
+
# @return [Object] Returns the model itself
|
112
|
+
def build_from_hash(attributes)
|
113
|
+
return nil unless attributes.is_a?(Hash)
|
114
|
+
self.class.swagger_types.each_pair do |key, type|
|
115
|
+
if type =~ /^Array<(.*)>/i
|
116
|
+
# check to ensure the input is an array given that the the attribute
|
117
|
+
# is documented as an array but the input is not
|
118
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
119
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
120
|
+
end
|
121
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
122
|
+
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
123
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
124
|
+
end
|
125
|
+
|
126
|
+
self
|
127
|
+
end
|
128
|
+
|
129
|
+
# Returns the string representation of the object
|
130
|
+
# @return [String] String presentation of the object
|
131
|
+
def to_s
|
132
|
+
to_hash.to_s
|
133
|
+
end
|
134
|
+
|
135
|
+
# Returns the object in the form of hash
|
136
|
+
# @return [Hash] Returns the object in the form of hash
|
137
|
+
def to_hash
|
138
|
+
hash = {}
|
139
|
+
self.class.attribute_map.each_pair do |attr, param|
|
140
|
+
value = self.send(attr)
|
141
|
+
next if value.nil?
|
142
|
+
hash[param] = _to_hash(value)
|
143
|
+
end
|
144
|
+
hash
|
145
|
+
end
|
146
|
+
|
147
|
+
private
|
148
|
+
|
149
|
+
# Outputs non-array value in the form of hash
|
150
|
+
# For object, use to_hash. Otherwise, just return the value
|
151
|
+
# @param [Object] value Any valid value
|
152
|
+
# @return [Hash] Returns the value in the form of hash
|
153
|
+
def _to_hash(value)
|
154
|
+
if value.is_a?(Array)
|
155
|
+
value.compact.map{ |v| _to_hash(v) }
|
156
|
+
elsif value.is_a?(Hash)
|
157
|
+
{}.tap do |hash|
|
158
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
159
|
+
end
|
160
|
+
elsif value.respond_to? :to_hash
|
161
|
+
value.to_hash
|
162
|
+
else
|
163
|
+
value
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
170
|
+
def self.attribute_map
|
171
|
+
{
|
172
|
+
:'bgp_md5_auth_key' => :'bgpMd5AuthKey',
|
173
|
+
:'cross_connect_or_cross_connect_group_id' => :'crossConnectOrCrossConnectGroupId',
|
174
|
+
:'customer_bgp_peering_ip' => :'customerBgpPeeringIp',
|
175
|
+
:'oracle_bgp_peering_ip' => :'oracleBgpPeeringIp',
|
176
|
+
:'vlan' => :'vlan'
|
177
|
+
}
|
178
|
+
end
|
179
|
+
|
180
|
+
# Attribute type mapping.
|
181
|
+
def self.swagger_types
|
182
|
+
{
|
183
|
+
:'bgp_md5_auth_key' => :'String',
|
184
|
+
:'cross_connect_or_cross_connect_group_id' => :'String',
|
185
|
+
:'customer_bgp_peering_ip' => :'String',
|
186
|
+
:'oracle_bgp_peering_ip' => :'String',
|
187
|
+
:'vlan' => :'Integer'
|
188
|
+
}
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
@@ -0,0 +1,138 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OracleBMC
|
6
|
+
class Core::Models::CrossConnectPortSpeedShape
|
7
|
+
# The name of the port speed shape.
|
8
|
+
#
|
9
|
+
# Example: `10 Gbps`
|
10
|
+
#
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :name
|
13
|
+
|
14
|
+
# The port speed in Gbps.
|
15
|
+
#
|
16
|
+
# Example: `10`
|
17
|
+
#
|
18
|
+
# @return [Integer]
|
19
|
+
attr_accessor :port_speed_in_gbps
|
20
|
+
|
21
|
+
|
22
|
+
# Initializes the object
|
23
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
24
|
+
def initialize(attributes = {})
|
25
|
+
return unless attributes.is_a?(Hash)
|
26
|
+
|
27
|
+
# convert string to symbol for hash key
|
28
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
29
|
+
|
30
|
+
|
31
|
+
if attributes[:'name']
|
32
|
+
self.name = attributes[:'name']
|
33
|
+
end
|
34
|
+
|
35
|
+
if attributes[:'portSpeedInGbps']
|
36
|
+
self.port_speed_in_gbps = attributes[:'portSpeedInGbps']
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
# Checks equality by comparing each attribute.
|
42
|
+
# @param [Object] other_object to be compared
|
43
|
+
def ==(other_object)
|
44
|
+
return true if self.equal?(other_object)
|
45
|
+
self.class == other_object.class &&
|
46
|
+
name == other_object.name &&
|
47
|
+
port_speed_in_gbps == other_object.port_speed_in_gbps
|
48
|
+
end
|
49
|
+
|
50
|
+
# @see the `==` method
|
51
|
+
# @param [Object] other_object to be compared
|
52
|
+
def eql?(other_object)
|
53
|
+
self == other_object
|
54
|
+
end
|
55
|
+
|
56
|
+
# Calculates hash code according to all attributes.
|
57
|
+
# @return [Fixnum] Hash code
|
58
|
+
def hash
|
59
|
+
[name, port_speed_in_gbps].hash
|
60
|
+
end
|
61
|
+
|
62
|
+
# Builds the object from hash
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
64
|
+
# @return [Object] Returns the model itself
|
65
|
+
def build_from_hash(attributes)
|
66
|
+
return nil unless attributes.is_a?(Hash)
|
67
|
+
self.class.swagger_types.each_pair do |key, type|
|
68
|
+
if type =~ /^Array<(.*)>/i
|
69
|
+
# check to ensure the input is an array given that the the attribute
|
70
|
+
# is documented as an array but the input is not
|
71
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
72
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
73
|
+
end
|
74
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
75
|
+
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
76
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
77
|
+
end
|
78
|
+
|
79
|
+
self
|
80
|
+
end
|
81
|
+
|
82
|
+
# Returns the string representation of the object
|
83
|
+
# @return [String] String presentation of the object
|
84
|
+
def to_s
|
85
|
+
to_hash.to_s
|
86
|
+
end
|
87
|
+
|
88
|
+
# Returns the object in the form of hash
|
89
|
+
# @return [Hash] Returns the object in the form of hash
|
90
|
+
def to_hash
|
91
|
+
hash = {}
|
92
|
+
self.class.attribute_map.each_pair do |attr, param|
|
93
|
+
value = self.send(attr)
|
94
|
+
next if value.nil?
|
95
|
+
hash[param] = _to_hash(value)
|
96
|
+
end
|
97
|
+
hash
|
98
|
+
end
|
99
|
+
|
100
|
+
private
|
101
|
+
|
102
|
+
# Outputs non-array value in the form of hash
|
103
|
+
# For object, use to_hash. Otherwise, just return the value
|
104
|
+
# @param [Object] value Any valid value
|
105
|
+
# @return [Hash] Returns the value in the form of hash
|
106
|
+
def _to_hash(value)
|
107
|
+
if value.is_a?(Array)
|
108
|
+
value.compact.map{ |v| _to_hash(v) }
|
109
|
+
elsif value.is_a?(Hash)
|
110
|
+
{}.tap do |hash|
|
111
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
112
|
+
end
|
113
|
+
elsif value.respond_to? :to_hash
|
114
|
+
value.to_hash
|
115
|
+
else
|
116
|
+
value
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
123
|
+
def self.attribute_map
|
124
|
+
{
|
125
|
+
:'name' => :'name',
|
126
|
+
:'port_speed_in_gbps' => :'portSpeedInGbps'
|
127
|
+
}
|
128
|
+
end
|
129
|
+
|
130
|
+
# Attribute type mapping.
|
131
|
+
def self.swagger_types
|
132
|
+
{
|
133
|
+
:'name' => :'String',
|
134
|
+
:'port_speed_in_gbps' => :'Integer'
|
135
|
+
}
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
@@ -0,0 +1,201 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OracleBMC
|
6
|
+
class Core::Models::CrossConnectStatus
|
7
|
+
|
8
|
+
INTERFACE_STATE_ENUM = [INTERFACE_STATE_UP = 'UP',
|
9
|
+
INTERFACE_STATE_DOWN = 'DOWN',
|
10
|
+
INTERFACE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
11
|
+
|
12
|
+
|
13
|
+
LIGHT_LEVEL_INDICATOR_ENUM = [LIGHT_LEVEL_INDICATOR_NO_LIGHT = 'NO_LIGHT',
|
14
|
+
LIGHT_LEVEL_INDICATOR_LOW_WARN = 'LOW_WARN',
|
15
|
+
LIGHT_LEVEL_INDICATOR_HIGH_WARN = 'HIGH_WARN',
|
16
|
+
LIGHT_LEVEL_INDICATOR_BAD = 'BAD',
|
17
|
+
LIGHT_LEVEL_INDICATOR_GOOD = 'GOOD',
|
18
|
+
LIGHT_LEVEL_INDICATOR_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
19
|
+
|
20
|
+
# The OCID of the cross-connect.
|
21
|
+
# @return [String]
|
22
|
+
attr_accessor :cross_connect_id
|
23
|
+
|
24
|
+
# Whether Oracle's side of the interface is up or down.
|
25
|
+
# @return [String]
|
26
|
+
attr_accessor :interface_state
|
27
|
+
|
28
|
+
# The light level of the cross-connect (in dBm).
|
29
|
+
#
|
30
|
+
# Example: `14.0`
|
31
|
+
#
|
32
|
+
# @return [Float]
|
33
|
+
attr_accessor :light_level_ind_bm
|
34
|
+
|
35
|
+
# Status indicator corresponding to the light level.
|
36
|
+
#
|
37
|
+
# * **NO_LIGHT:** No measurable light
|
38
|
+
#
|
39
|
+
# * **LOW_WARN:** There's measurable light but it's too low
|
40
|
+
#
|
41
|
+
# * **HIGH_WARN:** Light level is too high
|
42
|
+
#
|
43
|
+
# * **BAD:** There's measurable light but the signal-to-noise ratio is bad
|
44
|
+
#
|
45
|
+
# * **GOOD:** Good light level
|
46
|
+
#
|
47
|
+
# @return [String]
|
48
|
+
attr_accessor :light_level_indicator
|
49
|
+
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
return unless attributes.is_a?(Hash)
|
55
|
+
|
56
|
+
# convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
58
|
+
|
59
|
+
|
60
|
+
if attributes[:'crossConnectId']
|
61
|
+
self.cross_connect_id = attributes[:'crossConnectId']
|
62
|
+
end
|
63
|
+
|
64
|
+
if attributes[:'interfaceState']
|
65
|
+
self.interface_state = attributes[:'interfaceState']
|
66
|
+
end
|
67
|
+
|
68
|
+
if attributes[:'lightLevelIndBm']
|
69
|
+
self.light_level_ind_bm = attributes[:'lightLevelIndBm']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes[:'lightLevelIndicator']
|
73
|
+
self.light_level_indicator = attributes[:'lightLevelIndicator']
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
77
|
+
|
78
|
+
# Custom attribute writer method checking allowed values (enum).
|
79
|
+
# @param [Object] interface_state Object to be assigned
|
80
|
+
def interface_state=(interface_state)
|
81
|
+
if interface_state && !INTERFACE_STATE_ENUM.include?(interface_state)
|
82
|
+
@interface_state = INTERFACE_STATE_UNKNOWN_ENUM_VALUE
|
83
|
+
else
|
84
|
+
@interface_state = interface_state
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
# Custom attribute writer method checking allowed values (enum).
|
89
|
+
# @param [Object] light_level_indicator Object to be assigned
|
90
|
+
def light_level_indicator=(light_level_indicator)
|
91
|
+
if light_level_indicator && !LIGHT_LEVEL_INDICATOR_ENUM.include?(light_level_indicator)
|
92
|
+
@light_level_indicator = LIGHT_LEVEL_INDICATOR_UNKNOWN_ENUM_VALUE
|
93
|
+
else
|
94
|
+
@light_level_indicator = light_level_indicator
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
# Checks equality by comparing each attribute.
|
99
|
+
# @param [Object] other_object to be compared
|
100
|
+
def ==(other_object)
|
101
|
+
return true if self.equal?(other_object)
|
102
|
+
self.class == other_object.class &&
|
103
|
+
cross_connect_id == other_object.cross_connect_id &&
|
104
|
+
interface_state == other_object.interface_state &&
|
105
|
+
light_level_ind_bm == other_object.light_level_ind_bm &&
|
106
|
+
light_level_indicator == other_object.light_level_indicator
|
107
|
+
end
|
108
|
+
|
109
|
+
# @see the `==` method
|
110
|
+
# @param [Object] other_object to be compared
|
111
|
+
def eql?(other_object)
|
112
|
+
self == other_object
|
113
|
+
end
|
114
|
+
|
115
|
+
# Calculates hash code according to all attributes.
|
116
|
+
# @return [Fixnum] Hash code
|
117
|
+
def hash
|
118
|
+
[cross_connect_id, interface_state, light_level_ind_bm, light_level_indicator].hash
|
119
|
+
end
|
120
|
+
|
121
|
+
# Builds the object from hash
|
122
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
123
|
+
# @return [Object] Returns the model itself
|
124
|
+
def build_from_hash(attributes)
|
125
|
+
return nil unless attributes.is_a?(Hash)
|
126
|
+
self.class.swagger_types.each_pair do |key, type|
|
127
|
+
if type =~ /^Array<(.*)>/i
|
128
|
+
# check to ensure the input is an array given that the the attribute
|
129
|
+
# is documented as an array but the input is not
|
130
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
131
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
132
|
+
end
|
133
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
134
|
+
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
135
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
136
|
+
end
|
137
|
+
|
138
|
+
self
|
139
|
+
end
|
140
|
+
|
141
|
+
# Returns the string representation of the object
|
142
|
+
# @return [String] String presentation of the object
|
143
|
+
def to_s
|
144
|
+
to_hash.to_s
|
145
|
+
end
|
146
|
+
|
147
|
+
# Returns the object in the form of hash
|
148
|
+
# @return [Hash] Returns the object in the form of hash
|
149
|
+
def to_hash
|
150
|
+
hash = {}
|
151
|
+
self.class.attribute_map.each_pair do |attr, param|
|
152
|
+
value = self.send(attr)
|
153
|
+
next if value.nil?
|
154
|
+
hash[param] = _to_hash(value)
|
155
|
+
end
|
156
|
+
hash
|
157
|
+
end
|
158
|
+
|
159
|
+
private
|
160
|
+
|
161
|
+
# Outputs non-array value in the form of hash
|
162
|
+
# For object, use to_hash. Otherwise, just return the value
|
163
|
+
# @param [Object] value Any valid value
|
164
|
+
# @return [Hash] Returns the value in the form of hash
|
165
|
+
def _to_hash(value)
|
166
|
+
if value.is_a?(Array)
|
167
|
+
value.compact.map{ |v| _to_hash(v) }
|
168
|
+
elsif value.is_a?(Hash)
|
169
|
+
{}.tap do |hash|
|
170
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
171
|
+
end
|
172
|
+
elsif value.respond_to? :to_hash
|
173
|
+
value.to_hash
|
174
|
+
else
|
175
|
+
value
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
182
|
+
def self.attribute_map
|
183
|
+
{
|
184
|
+
:'cross_connect_id' => :'crossConnectId',
|
185
|
+
:'interface_state' => :'interfaceState',
|
186
|
+
:'light_level_ind_bm' => :'lightLevelIndBm',
|
187
|
+
:'light_level_indicator' => :'lightLevelIndicator'
|
188
|
+
}
|
189
|
+
end
|
190
|
+
|
191
|
+
# Attribute type mapping.
|
192
|
+
def self.swagger_types
|
193
|
+
{
|
194
|
+
:'cross_connect_id' => :'String',
|
195
|
+
:'interface_state' => :'String',
|
196
|
+
:'light_level_ind_bm' => :'Float',
|
197
|
+
:'light_level_indicator' => :'String'
|
198
|
+
}
|
199
|
+
end
|
200
|
+
end
|
201
|
+
end
|