oraclebmc 1.2.4 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{README.md → README_BMCS.md} +21 -26
- data/lib/oraclebmc.rb +1 -19
- metadata +16 -259
- data/lib/oraclebmc/api_client.rb +0 -306
- data/lib/oraclebmc/config.rb +0 -80
- data/lib/oraclebmc/config_file_loader.rb +0 -85
- data/lib/oraclebmc/core/blockstorage_client.rb +0 -460
- data/lib/oraclebmc/core/compute_client.rb +0 -1267
- data/lib/oraclebmc/core/core.rb +0 -112
- data/lib/oraclebmc/core/models/attach_i_scsi_volume_details.rb +0 -137
- data/lib/oraclebmc/core/models/attach_vnic_details.rb +0 -144
- data/lib/oraclebmc/core/models/attach_volume_details.rb +0 -165
- data/lib/oraclebmc/core/models/capture_console_history_details.rb +0 -120
- data/lib/oraclebmc/core/models/console_history.rb +0 -213
- data/lib/oraclebmc/core/models/cpe.rb +0 -169
- data/lib/oraclebmc/core/models/create_cpe_details.rb +0 -145
- data/lib/oraclebmc/core/models/create_cross_connect_details.rb +0 -204
- data/lib/oraclebmc/core/models/create_cross_connect_group_details.rb +0 -133
- data/lib/oraclebmc/core/models/create_dhcp_details.rb +0 -153
- data/lib/oraclebmc/core/models/create_drg_attachment_details.rb +0 -142
- data/lib/oraclebmc/core/models/create_drg_details.rb +0 -131
- data/lib/oraclebmc/core/models/create_image_details.rb +0 -159
- data/lib/oraclebmc/core/models/create_internet_gateway_details.rb +0 -153
- data/lib/oraclebmc/core/models/create_ip_sec_connection_details.rb +0 -168
- data/lib/oraclebmc/core/models/create_private_ip_details.rb +0 -173
- data/lib/oraclebmc/core/models/create_route_table_details.rb +0 -153
- data/lib/oraclebmc/core/models/create_security_list_details.rb +0 -164
- data/lib/oraclebmc/core/models/create_subnet_details.rb +0 -257
- data/lib/oraclebmc/core/models/create_vcn_details.rb +0 -171
- data/lib/oraclebmc/core/models/create_virtual_circuit_details.rb +0 -260
- data/lib/oraclebmc/core/models/create_vnic_details.rb +0 -214
- data/lib/oraclebmc/core/models/create_volume_backup_details.rb +0 -133
- data/lib/oraclebmc/core/models/create_volume_details.rb +0 -170
- data/lib/oraclebmc/core/models/cross_connect.rb +0 -235
- data/lib/oraclebmc/core/models/cross_connect_group.rb +0 -187
- data/lib/oraclebmc/core/models/cross_connect_location.rb +0 -134
- data/lib/oraclebmc/core/models/cross_connect_mapping.rb +0 -190
- data/lib/oraclebmc/core/models/cross_connect_port_speed_shape.rb +0 -137
- data/lib/oraclebmc/core/models/cross_connect_status.rb +0 -200
- data/lib/oraclebmc/core/models/dhcp_dns_option.rb +0 -171
- data/lib/oraclebmc/core/models/dhcp_option.rb +0 -135
- data/lib/oraclebmc/core/models/dhcp_options.rb +0 -208
- data/lib/oraclebmc/core/models/dhcp_search_domain_option.rb +0 -141
- data/lib/oraclebmc/core/models/drg.rb +0 -186
- data/lib/oraclebmc/core/models/drg_attachment.rb +0 -208
- data/lib/oraclebmc/core/models/egress_security_rule.rb +0 -198
- data/lib/oraclebmc/core/models/export_image_details.rb +0 -134
- data/lib/oraclebmc/core/models/export_image_via_object_storage_tuple_details.rb +0 -150
- data/lib/oraclebmc/core/models/export_image_via_object_storage_uri_details.rb +0 -130
- data/lib/oraclebmc/core/models/fast_connect_provider_service.rb +0 -145
- data/lib/oraclebmc/core/models/i_scsi_volume_attachment.rb +0 -212
- data/lib/oraclebmc/core/models/icmp_options.rb +0 -131
- data/lib/oraclebmc/core/models/image.rb +0 -245
- data/lib/oraclebmc/core/models/image_source_details.rb +0 -134
- data/lib/oraclebmc/core/models/image_source_via_object_storage_tuple_details.rb +0 -150
- data/lib/oraclebmc/core/models/image_source_via_object_storage_uri_details.rb +0 -128
- data/lib/oraclebmc/core/models/ingress_security_rule.rb +0 -198
- data/lib/oraclebmc/core/models/instance.rb +0 -307
- data/lib/oraclebmc/core/models/instance_credentials.rb +0 -131
- data/lib/oraclebmc/core/models/internet_gateway.rb +0 -210
- data/lib/oraclebmc/core/models/ip_sec_connection.rb +0 -223
- data/lib/oraclebmc/core/models/ip_sec_connection_device_config.rb +0 -153
- data/lib/oraclebmc/core/models/ip_sec_connection_device_status.rb +0 -156
- data/lib/oraclebmc/core/models/launch_instance_details.rb +0 -336
- data/lib/oraclebmc/core/models/letter_of_authority.rb +0 -194
- data/lib/oraclebmc/core/models/port_range.rb +0 -133
- data/lib/oraclebmc/core/models/private_ip.rb +0 -248
- data/lib/oraclebmc/core/models/route_rule.rb +0 -135
- data/lib/oraclebmc/core/models/route_table.rb +0 -208
- data/lib/oraclebmc/core/models/security_list.rb +0 -219
- data/lib/oraclebmc/core/models/shape.rb +0 -122
- data/lib/oraclebmc/core/models/subnet.rb +0 -351
- data/lib/oraclebmc/core/models/tcp_options.rb +0 -135
- data/lib/oraclebmc/core/models/tunnel_config.rb +0 -151
- data/lib/oraclebmc/core/models/tunnel_status.rb +0 -178
- data/lib/oraclebmc/core/models/udp_options.rb +0 -135
- data/lib/oraclebmc/core/models/update_cpe_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_cross_connect_details.rb +0 -138
- data/lib/oraclebmc/core/models/update_cross_connect_group_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_dhcp_details.rb +0 -132
- data/lib/oraclebmc/core/models/update_drg_attachment_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_drg_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_image_details.rb +0 -124
- data/lib/oraclebmc/core/models/update_instance_details.rb +0 -124
- data/lib/oraclebmc/core/models/update_internet_gateway_details.rb +0 -133
- data/lib/oraclebmc/core/models/update_ip_sec_connection_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_private_ip_details.rb +0 -157
- data/lib/oraclebmc/core/models/update_route_table_details.rb +0 -133
- data/lib/oraclebmc/core/models/update_security_list_details.rb +0 -144
- data/lib/oraclebmc/core/models/update_subnet_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_vcn_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_virtual_circuit_details.rb +0 -240
- data/lib/oraclebmc/core/models/update_vnic_details.rb +0 -144
- data/lib/oraclebmc/core/models/update_volume_backup_details.rb +0 -122
- data/lib/oraclebmc/core/models/update_volume_details.rb +0 -122
- data/lib/oraclebmc/core/models/vcn.rb +0 -276
- data/lib/oraclebmc/core/models/virtual_circuit.rb +0 -395
- data/lib/oraclebmc/core/models/virtual_circuit_bandwidth_shape.rb +0 -137
- data/lib/oraclebmc/core/models/vnic.rb +0 -287
- data/lib/oraclebmc/core/models/vnic_attachment.rb +0 -250
- data/lib/oraclebmc/core/models/volume.rb +0 -210
- data/lib/oraclebmc/core/models/volume_attachment.rb +0 -246
- data/lib/oraclebmc/core/models/volume_backup.rb +0 -235
- data/lib/oraclebmc/core/util.rb +0 -1
- data/lib/oraclebmc/core/virtual_network_client.rb +0 -3419
- data/lib/oraclebmc/errors.rb +0 -80
- data/lib/oraclebmc/global_context.rb +0 -21
- data/lib/oraclebmc/identity/identity.rb +0 -51
- data/lib/oraclebmc/identity/identity_client.rb +0 -1983
- data/lib/oraclebmc/identity/models/add_user_to_group_details.rb +0 -131
- data/lib/oraclebmc/identity/models/api_key.rb +0 -211
- data/lib/oraclebmc/identity/models/availability_domain.rb +0 -131
- data/lib/oraclebmc/identity/models/compartment.rb +0 -211
- data/lib/oraclebmc/identity/models/create_api_key_details.rb +0 -120
- data/lib/oraclebmc/identity/models/create_compartment_details.rb +0 -145
- data/lib/oraclebmc/identity/models/create_group_details.rb +0 -144
- data/lib/oraclebmc/identity/models/create_identity_provider_details.rb +0 -212
- data/lib/oraclebmc/identity/models/create_idp_group_mapping_details.rb +0 -133
- data/lib/oraclebmc/identity/models/create_policy_details.rb +0 -173
- data/lib/oraclebmc/identity/models/create_region_subscription_details.rb +0 -127
- data/lib/oraclebmc/identity/models/create_saml2_identity_provider_details.rb +0 -154
- data/lib/oraclebmc/identity/models/create_swift_password_details.rb +0 -121
- data/lib/oraclebmc/identity/models/create_user_details.rb +0 -144
- data/lib/oraclebmc/identity/models/group.rb +0 -211
- data/lib/oraclebmc/identity/models/identity_provider.rb +0 -256
- data/lib/oraclebmc/identity/models/idp_group_mapping.rb +0 -220
- data/lib/oraclebmc/identity/models/policy.rb +0 -237
- data/lib/oraclebmc/identity/models/region.rb +0 -141
- data/lib/oraclebmc/identity/models/region_subscription.rb +0 -178
- data/lib/oraclebmc/identity/models/saml2_identity_provider.rb +0 -180
- data/lib/oraclebmc/identity/models/swift_password.rb +0 -226
- data/lib/oraclebmc/identity/models/tenancy.rb +0 -158
- data/lib/oraclebmc/identity/models/ui_password.rb +0 -187
- data/lib/oraclebmc/identity/models/update_compartment_details.rb +0 -120
- data/lib/oraclebmc/identity/models/update_group_details.rb +0 -120
- data/lib/oraclebmc/identity/models/update_identity_provider_details.rb +0 -160
- data/lib/oraclebmc/identity/models/update_idp_group_mapping_details.rb +0 -131
- data/lib/oraclebmc/identity/models/update_policy_details.rb +0 -148
- data/lib/oraclebmc/identity/models/update_saml2_identity_provider_details.rb +0 -145
- data/lib/oraclebmc/identity/models/update_state_details.rb +0 -121
- data/lib/oraclebmc/identity/models/update_swift_password_details.rb +0 -120
- data/lib/oraclebmc/identity/models/update_user_details.rb +0 -120
- data/lib/oraclebmc/identity/models/user.rb +0 -217
- data/lib/oraclebmc/identity/models/user_group_membership.rb +0 -209
- data/lib/oraclebmc/identity/util.rb +0 -1
- data/lib/oraclebmc/internal/internal.rb +0 -11
- data/lib/oraclebmc/internal/util.rb +0 -69
- data/lib/oraclebmc/load_balancer/load_balancer.rb +0 -46
- data/lib/oraclebmc/load_balancer/load_balancer_client.rb +0 -1281
- data/lib/oraclebmc/load_balancer/models/backend.rb +0 -220
- data/lib/oraclebmc/load_balancer/models/backend_details.rb +0 -206
- data/lib/oraclebmc/load_balancer/models/backend_set.rb +0 -179
- data/lib/oraclebmc/load_balancer/models/backend_set_details.rb +0 -165
- data/lib/oraclebmc/load_balancer/models/certificate.rb +0 -167
- data/lib/oraclebmc/load_balancer/models/certificate_details.rb +0 -203
- data/lib/oraclebmc/load_balancer/models/create_backend_details.rb +0 -206
- data/lib/oraclebmc/load_balancer/models/create_backend_set_details.rb +0 -178
- data/lib/oraclebmc/load_balancer/models/create_certificate_details.rb +0 -203
- data/lib/oraclebmc/load_balancer/models/create_listener_details.rb +0 -174
- data/lib/oraclebmc/load_balancer/models/create_load_balancer_details.rb +0 -219
- data/lib/oraclebmc/load_balancer/models/health_checker.rb +0 -223
- data/lib/oraclebmc/load_balancer/models/health_checker_details.rb +0 -222
- data/lib/oraclebmc/load_balancer/models/ip_address.rb +0 -139
- data/lib/oraclebmc/load_balancer/models/listener.rb +0 -174
- data/lib/oraclebmc/load_balancer/models/listener_details.rb +0 -160
- data/lib/oraclebmc/load_balancer/models/load_balancer.rb +0 -280
- data/lib/oraclebmc/load_balancer/models/load_balancer_policy.rb +0 -120
- data/lib/oraclebmc/load_balancer/models/load_balancer_protocol.rb +0 -120
- data/lib/oraclebmc/load_balancer/models/load_balancer_shape.rb +0 -120
- data/lib/oraclebmc/load_balancer/models/session_persistence_configuration_details.rb +0 -141
- data/lib/oraclebmc/load_balancer/models/ssl_configuration.rb +0 -153
- data/lib/oraclebmc/load_balancer/models/ssl_configuration_details.rb +0 -153
- data/lib/oraclebmc/load_balancer/models/update_backend_details.rb +0 -178
- data/lib/oraclebmc/load_balancer/models/update_backend_set_details.rb +0 -165
- data/lib/oraclebmc/load_balancer/models/update_health_checker_details.rb +0 -221
- data/lib/oraclebmc/load_balancer/models/update_listener_details.rb +0 -160
- data/lib/oraclebmc/load_balancer/models/update_load_balancer_details.rb +0 -123
- data/lib/oraclebmc/load_balancer/models/work_request.rb +0 -229
- data/lib/oraclebmc/load_balancer/models/work_request_error.rb +0 -145
- data/lib/oraclebmc/load_balancer/util.rb +0 -55
- data/lib/oraclebmc/regions.rb +0 -41
- data/lib/oraclebmc/response.rb +0 -86
- data/lib/oraclebmc/signer.rb +0 -119
- data/lib/oraclebmc/version.rb +0 -5
- data/lib/oraclebmc/waiter.rb +0 -111
@@ -1,137 +0,0 @@
|
|
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
|
-
if attributes[:'name']
|
31
|
-
self.name = attributes[:'name']
|
32
|
-
end
|
33
|
-
|
34
|
-
if attributes[:'portSpeedInGbps']
|
35
|
-
self.port_speed_in_gbps = attributes[:'portSpeedInGbps']
|
36
|
-
end
|
37
|
-
|
38
|
-
end
|
39
|
-
|
40
|
-
# Checks equality by comparing each attribute.
|
41
|
-
# @param [Object] other_object to be compared
|
42
|
-
def ==(other_object)
|
43
|
-
return true if self.equal?(other_object)
|
44
|
-
self.class == other_object.class &&
|
45
|
-
name == other_object.name &&
|
46
|
-
port_speed_in_gbps == other_object.port_speed_in_gbps
|
47
|
-
end
|
48
|
-
|
49
|
-
# @see the `==` method
|
50
|
-
# @param [Object] other_object to be compared
|
51
|
-
def eql?(other_object)
|
52
|
-
self == other_object
|
53
|
-
end
|
54
|
-
|
55
|
-
# Calculates hash code according to all attributes.
|
56
|
-
# @return [Fixnum] Hash code
|
57
|
-
def hash
|
58
|
-
[name, port_speed_in_gbps].hash
|
59
|
-
end
|
60
|
-
|
61
|
-
# Builds the object from hash
|
62
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
63
|
-
# @return [Object] Returns the model itself
|
64
|
-
def build_from_hash(attributes)
|
65
|
-
return nil unless attributes.is_a?(Hash)
|
66
|
-
self.class.swagger_types.each_pair do |key, type|
|
67
|
-
if type =~ /^Array<(.*)>/i
|
68
|
-
# check to ensure the input is an array given that the the attribute
|
69
|
-
# is documented as an array but the input is not
|
70
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
71
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
72
|
-
end
|
73
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
74
|
-
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
75
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
76
|
-
end
|
77
|
-
|
78
|
-
self
|
79
|
-
end
|
80
|
-
|
81
|
-
# Returns the string representation of the object
|
82
|
-
# @return [String] String presentation of the object
|
83
|
-
def to_s
|
84
|
-
to_hash.to_s
|
85
|
-
end
|
86
|
-
|
87
|
-
# Returns the object in the form of hash
|
88
|
-
# @return [Hash] Returns the object in the form of hash
|
89
|
-
def to_hash
|
90
|
-
hash = {}
|
91
|
-
self.class.attribute_map.each_pair do |attr, param|
|
92
|
-
value = self.send(attr)
|
93
|
-
next if value.nil?
|
94
|
-
hash[param] = _to_hash(value)
|
95
|
-
end
|
96
|
-
hash
|
97
|
-
end
|
98
|
-
|
99
|
-
private
|
100
|
-
|
101
|
-
# Outputs non-array value in the form of hash
|
102
|
-
# For object, use to_hash. Otherwise, just return the value
|
103
|
-
# @param [Object] value Any valid value
|
104
|
-
# @return [Hash] Returns the value in the form of hash
|
105
|
-
def _to_hash(value)
|
106
|
-
if value.is_a?(Array)
|
107
|
-
value.compact.map{ |v| _to_hash(v) }
|
108
|
-
elsif value.is_a?(Hash)
|
109
|
-
{}.tap do |hash|
|
110
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
111
|
-
end
|
112
|
-
elsif value.respond_to? :to_hash
|
113
|
-
value.to_hash
|
114
|
-
else
|
115
|
-
value
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
122
|
-
def self.attribute_map
|
123
|
-
{
|
124
|
-
:'name' => :'name',
|
125
|
-
:'port_speed_in_gbps' => :'portSpeedInGbps'
|
126
|
-
}
|
127
|
-
end
|
128
|
-
|
129
|
-
# Attribute type mapping.
|
130
|
-
def self.swagger_types
|
131
|
-
{
|
132
|
-
:'name' => :'String',
|
133
|
-
:'port_speed_in_gbps' => :'Integer'
|
134
|
-
}
|
135
|
-
end
|
136
|
-
end
|
137
|
-
end
|
@@ -1,200 +0,0 @@
|
|
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
|
-
if attributes[:'crossConnectId']
|
60
|
-
self.cross_connect_id = attributes[:'crossConnectId']
|
61
|
-
end
|
62
|
-
|
63
|
-
if attributes[:'interfaceState']
|
64
|
-
self.interface_state = attributes[:'interfaceState']
|
65
|
-
end
|
66
|
-
|
67
|
-
if attributes[:'lightLevelIndBm']
|
68
|
-
self.light_level_ind_bm = attributes[:'lightLevelIndBm']
|
69
|
-
end
|
70
|
-
|
71
|
-
if attributes[:'lightLevelIndicator']
|
72
|
-
self.light_level_indicator = attributes[:'lightLevelIndicator']
|
73
|
-
end
|
74
|
-
|
75
|
-
end
|
76
|
-
|
77
|
-
# Custom attribute writer method checking allowed values (enum).
|
78
|
-
# @param [Object] interface_state Object to be assigned
|
79
|
-
def interface_state=(interface_state)
|
80
|
-
if interface_state && !INTERFACE_STATE_ENUM.include?(interface_state)
|
81
|
-
@interface_state = INTERFACE_STATE_UNKNOWN_ENUM_VALUE
|
82
|
-
else
|
83
|
-
@interface_state = interface_state
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
|
-
# Custom attribute writer method checking allowed values (enum).
|
88
|
-
# @param [Object] light_level_indicator Object to be assigned
|
89
|
-
def light_level_indicator=(light_level_indicator)
|
90
|
-
if light_level_indicator && !LIGHT_LEVEL_INDICATOR_ENUM.include?(light_level_indicator)
|
91
|
-
@light_level_indicator = LIGHT_LEVEL_INDICATOR_UNKNOWN_ENUM_VALUE
|
92
|
-
else
|
93
|
-
@light_level_indicator = light_level_indicator
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
# Checks equality by comparing each attribute.
|
98
|
-
# @param [Object] other_object to be compared
|
99
|
-
def ==(other_object)
|
100
|
-
return true if self.equal?(other_object)
|
101
|
-
self.class == other_object.class &&
|
102
|
-
cross_connect_id == other_object.cross_connect_id &&
|
103
|
-
interface_state == other_object.interface_state &&
|
104
|
-
light_level_ind_bm == other_object.light_level_ind_bm &&
|
105
|
-
light_level_indicator == other_object.light_level_indicator
|
106
|
-
end
|
107
|
-
|
108
|
-
# @see the `==` method
|
109
|
-
# @param [Object] other_object to be compared
|
110
|
-
def eql?(other_object)
|
111
|
-
self == other_object
|
112
|
-
end
|
113
|
-
|
114
|
-
# Calculates hash code according to all attributes.
|
115
|
-
# @return [Fixnum] Hash code
|
116
|
-
def hash
|
117
|
-
[cross_connect_id, interface_state, light_level_ind_bm, light_level_indicator].hash
|
118
|
-
end
|
119
|
-
|
120
|
-
# Builds the object from hash
|
121
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
122
|
-
# @return [Object] Returns the model itself
|
123
|
-
def build_from_hash(attributes)
|
124
|
-
return nil unless attributes.is_a?(Hash)
|
125
|
-
self.class.swagger_types.each_pair do |key, type|
|
126
|
-
if type =~ /^Array<(.*)>/i
|
127
|
-
# check to ensure the input is an array given that the the attribute
|
128
|
-
# is documented as an array but the input is not
|
129
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
130
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
131
|
-
end
|
132
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
133
|
-
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
134
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
135
|
-
end
|
136
|
-
|
137
|
-
self
|
138
|
-
end
|
139
|
-
|
140
|
-
# Returns the string representation of the object
|
141
|
-
# @return [String] String presentation of the object
|
142
|
-
def to_s
|
143
|
-
to_hash.to_s
|
144
|
-
end
|
145
|
-
|
146
|
-
# Returns the object in the form of hash
|
147
|
-
# @return [Hash] Returns the object in the form of hash
|
148
|
-
def to_hash
|
149
|
-
hash = {}
|
150
|
-
self.class.attribute_map.each_pair do |attr, param|
|
151
|
-
value = self.send(attr)
|
152
|
-
next if value.nil?
|
153
|
-
hash[param] = _to_hash(value)
|
154
|
-
end
|
155
|
-
hash
|
156
|
-
end
|
157
|
-
|
158
|
-
private
|
159
|
-
|
160
|
-
# Outputs non-array value in the form of hash
|
161
|
-
# For object, use to_hash. Otherwise, just return the value
|
162
|
-
# @param [Object] value Any valid value
|
163
|
-
# @return [Hash] Returns the value in the form of hash
|
164
|
-
def _to_hash(value)
|
165
|
-
if value.is_a?(Array)
|
166
|
-
value.compact.map{ |v| _to_hash(v) }
|
167
|
-
elsif value.is_a?(Hash)
|
168
|
-
{}.tap do |hash|
|
169
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
170
|
-
end
|
171
|
-
elsif value.respond_to? :to_hash
|
172
|
-
value.to_hash
|
173
|
-
else
|
174
|
-
value
|
175
|
-
end
|
176
|
-
end
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
181
|
-
def self.attribute_map
|
182
|
-
{
|
183
|
-
:'cross_connect_id' => :'crossConnectId',
|
184
|
-
:'interface_state' => :'interfaceState',
|
185
|
-
:'light_level_ind_bm' => :'lightLevelIndBm',
|
186
|
-
:'light_level_indicator' => :'lightLevelIndicator'
|
187
|
-
}
|
188
|
-
end
|
189
|
-
|
190
|
-
# Attribute type mapping.
|
191
|
-
def self.swagger_types
|
192
|
-
{
|
193
|
-
:'cross_connect_id' => :'String',
|
194
|
-
:'interface_state' => :'String',
|
195
|
-
:'light_level_ind_bm' => :'Float',
|
196
|
-
:'light_level_indicator' => :'String'
|
197
|
-
}
|
198
|
-
end
|
199
|
-
end
|
200
|
-
end
|
@@ -1,171 +0,0 @@
|
|
1
|
-
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
-
|
3
|
-
require 'date'
|
4
|
-
require_relative 'dhcp_option'
|
5
|
-
|
6
|
-
module OracleBMC
|
7
|
-
class Core::Models::DhcpDnsOption < Core::Models::DhcpOption
|
8
|
-
|
9
|
-
SERVER_TYPE_ENUM = [SERVER_TYPE_VCN_LOCAL = 'VcnLocal',
|
10
|
-
SERVER_TYPE_VCN_LOCAL_PLUS_INTERNET = 'VcnLocalPlusInternet',
|
11
|
-
SERVER_TYPE_CUSTOM_DNS_SERVER = 'CustomDnsServer',
|
12
|
-
SERVER_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
13
|
-
|
14
|
-
# If you set `serverType` to `CustomDnsServer`, specify the IP address
|
15
|
-
# of at least one DNS server of your choice (three maximum).
|
16
|
-
#
|
17
|
-
# @return [Array<String>]
|
18
|
-
attr_accessor :custom_dns_servers
|
19
|
-
|
20
|
-
# - **VcnLocal:** Reserved for future use.
|
21
|
-
#
|
22
|
-
# - **VcnLocalPlusInternet:** Also referred to as \"Internet and VCN Resolver\".
|
23
|
-
# Instances can resolve internet hostnames (no Internet Gateway is required),
|
24
|
-
# and can resolve hostnames of instances in the VCN. This is the default
|
25
|
-
# value in the default set of DHCP options in the VCN. For the Internet and
|
26
|
-
# VCN Resolver to work across the VCN, there must also be a DNS label set for
|
27
|
-
# the VCN, a DNS label set for each subnet, and a hostname for each instance.
|
28
|
-
# The Internet and VCN Resolver also enables reverse DNS lookup, which lets
|
29
|
-
# you determine the hostname corresponding to the private IP address. For more
|
30
|
-
# information, see
|
31
|
-
# [DNS in Your Virtual Cloud Network](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm).
|
32
|
-
#
|
33
|
-
# - **CustomDnsServer:** Instances use a DNS server of your choice (three maximum).
|
34
|
-
#
|
35
|
-
# @return [String]
|
36
|
-
attr_accessor :server_type
|
37
|
-
|
38
|
-
|
39
|
-
# Initializes the object
|
40
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
-
def initialize(attributes = {})
|
42
|
-
return unless attributes.is_a?(Hash)
|
43
|
-
|
44
|
-
attributes['type'] = 'DomainNameServer'
|
45
|
-
|
46
|
-
super(attributes)
|
47
|
-
|
48
|
-
# convert string to symbol for hash key
|
49
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
50
|
-
|
51
|
-
if attributes[:'customDnsServers']
|
52
|
-
self.custom_dns_servers = attributes[:'customDnsServers']
|
53
|
-
end
|
54
|
-
|
55
|
-
if attributes[:'serverType']
|
56
|
-
self.server_type = attributes[:'serverType']
|
57
|
-
end
|
58
|
-
|
59
|
-
end
|
60
|
-
|
61
|
-
# Custom attribute writer method checking allowed values (enum).
|
62
|
-
# @param [Object] server_type Object to be assigned
|
63
|
-
def server_type=(server_type)
|
64
|
-
if server_type && !SERVER_TYPE_ENUM.include?(server_type)
|
65
|
-
@server_type = SERVER_TYPE_UNKNOWN_ENUM_VALUE
|
66
|
-
else
|
67
|
-
@server_type = server_type
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
# Checks equality by comparing each attribute.
|
72
|
-
# @param [Object] other_object to be compared
|
73
|
-
def ==(other_object)
|
74
|
-
return true if self.equal?(other_object)
|
75
|
-
self.class == other_object.class &&
|
76
|
-
type == other_object.type &&
|
77
|
-
custom_dns_servers == other_object.custom_dns_servers &&
|
78
|
-
server_type == other_object.server_type
|
79
|
-
end
|
80
|
-
|
81
|
-
# @see the `==` method
|
82
|
-
# @param [Object] other_object to be compared
|
83
|
-
def eql?(other_object)
|
84
|
-
self == other_object
|
85
|
-
end
|
86
|
-
|
87
|
-
# Calculates hash code according to all attributes.
|
88
|
-
# @return [Fixnum] Hash code
|
89
|
-
def hash
|
90
|
-
[type, custom_dns_servers, server_type].hash
|
91
|
-
end
|
92
|
-
|
93
|
-
# Builds the object from hash
|
94
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
95
|
-
# @return [Object] Returns the model itself
|
96
|
-
def build_from_hash(attributes)
|
97
|
-
return nil unless attributes.is_a?(Hash)
|
98
|
-
self.class.swagger_types.each_pair do |key, type|
|
99
|
-
if type =~ /^Array<(.*)>/i
|
100
|
-
# check to ensure the input is an array given that the the attribute
|
101
|
-
# is documented as an array but the input is not
|
102
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
103
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
104
|
-
end
|
105
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
106
|
-
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
107
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
108
|
-
end
|
109
|
-
|
110
|
-
self
|
111
|
-
end
|
112
|
-
|
113
|
-
# Returns the string representation of the object
|
114
|
-
# @return [String] String presentation of the object
|
115
|
-
def to_s
|
116
|
-
to_hash.to_s
|
117
|
-
end
|
118
|
-
|
119
|
-
# Returns the object in the form of hash
|
120
|
-
# @return [Hash] Returns the object in the form of hash
|
121
|
-
def to_hash
|
122
|
-
hash = {}
|
123
|
-
self.class.attribute_map.each_pair do |attr, param|
|
124
|
-
value = self.send(attr)
|
125
|
-
next if value.nil?
|
126
|
-
hash[param] = _to_hash(value)
|
127
|
-
end
|
128
|
-
hash
|
129
|
-
end
|
130
|
-
|
131
|
-
private
|
132
|
-
|
133
|
-
# Outputs non-array value in the form of hash
|
134
|
-
# For object, use to_hash. Otherwise, just return the value
|
135
|
-
# @param [Object] value Any valid value
|
136
|
-
# @return [Hash] Returns the value in the form of hash
|
137
|
-
def _to_hash(value)
|
138
|
-
if value.is_a?(Array)
|
139
|
-
value.compact.map{ |v| _to_hash(v) }
|
140
|
-
elsif value.is_a?(Hash)
|
141
|
-
{}.tap do |hash|
|
142
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
143
|
-
end
|
144
|
-
elsif value.respond_to? :to_hash
|
145
|
-
value.to_hash
|
146
|
-
else
|
147
|
-
value
|
148
|
-
end
|
149
|
-
end
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
154
|
-
def self.attribute_map
|
155
|
-
{
|
156
|
-
:'type' => :'type',
|
157
|
-
:'custom_dns_servers' => :'customDnsServers',
|
158
|
-
:'server_type' => :'serverType'
|
159
|
-
}
|
160
|
-
end
|
161
|
-
|
162
|
-
# Attribute type mapping.
|
163
|
-
def self.swagger_types
|
164
|
-
{
|
165
|
-
:'type' => :'String',
|
166
|
-
:'custom_dns_servers' => :'Array<String>',
|
167
|
-
:'server_type' => :'String'
|
168
|
-
}
|
169
|
-
end
|
170
|
-
end
|
171
|
-
end
|