oci 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +82 -0
- data/README.md +262 -0
- data/lib/oci.rb +25 -0
- data/lib/oci/api_client.rb +389 -0
- data/lib/oci/config.rb +118 -0
- data/lib/oci/config_file_loader.rb +96 -0
- data/lib/oci/core/blockstorage_client.rb +462 -0
- data/lib/oci/core/compute_client.rb +1415 -0
- data/lib/oci/core/core.rb +114 -0
- data/lib/oci/core/models/attach_i_scsi_volume_details.rb +137 -0
- data/lib/oci/core/models/attach_vnic_details.rb +144 -0
- data/lib/oci/core/models/attach_volume_details.rb +165 -0
- data/lib/oci/core/models/capture_console_history_details.rb +120 -0
- data/lib/oci/core/models/console_history.rb +213 -0
- data/lib/oci/core/models/cpe.rb +169 -0
- data/lib/oci/core/models/create_cpe_details.rb +145 -0
- data/lib/oci/core/models/create_cross_connect_details.rb +204 -0
- data/lib/oci/core/models/create_cross_connect_group_details.rb +133 -0
- data/lib/oci/core/models/create_dhcp_details.rb +153 -0
- data/lib/oci/core/models/create_drg_attachment_details.rb +142 -0
- data/lib/oci/core/models/create_drg_details.rb +131 -0
- data/lib/oci/core/models/create_image_details.rb +159 -0
- data/lib/oci/core/models/create_instance_console_connection_details.rb +131 -0
- data/lib/oci/core/models/create_internet_gateway_details.rb +153 -0
- data/lib/oci/core/models/create_ip_sec_connection_details.rb +168 -0
- data/lib/oci/core/models/create_private_ip_details.rb +173 -0
- data/lib/oci/core/models/create_route_table_details.rb +153 -0
- data/lib/oci/core/models/create_security_list_details.rb +164 -0
- data/lib/oci/core/models/create_subnet_details.rb +257 -0
- data/lib/oci/core/models/create_vcn_details.rb +171 -0
- data/lib/oci/core/models/create_virtual_circuit_details.rb +260 -0
- data/lib/oci/core/models/create_vnic_details.rb +214 -0
- data/lib/oci/core/models/create_volume_backup_details.rb +133 -0
- data/lib/oci/core/models/create_volume_details.rb +170 -0
- data/lib/oci/core/models/cross_connect.rb +235 -0
- data/lib/oci/core/models/cross_connect_group.rb +187 -0
- data/lib/oci/core/models/cross_connect_location.rb +134 -0
- data/lib/oci/core/models/cross_connect_mapping.rb +190 -0
- data/lib/oci/core/models/cross_connect_port_speed_shape.rb +137 -0
- data/lib/oci/core/models/cross_connect_status.rb +200 -0
- data/lib/oci/core/models/dhcp_dns_option.rb +171 -0
- data/lib/oci/core/models/dhcp_option.rb +135 -0
- data/lib/oci/core/models/dhcp_options.rb +208 -0
- data/lib/oci/core/models/dhcp_search_domain_option.rb +141 -0
- data/lib/oci/core/models/drg.rb +186 -0
- data/lib/oci/core/models/drg_attachment.rb +208 -0
- data/lib/oci/core/models/egress_security_rule.rb +198 -0
- data/lib/oci/core/models/export_image_details.rb +134 -0
- data/lib/oci/core/models/export_image_via_object_storage_tuple_details.rb +150 -0
- data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +130 -0
- data/lib/oci/core/models/fast_connect_provider_service.rb +145 -0
- data/lib/oci/core/models/i_scsi_volume_attachment.rb +212 -0
- data/lib/oci/core/models/icmp_options.rb +131 -0
- data/lib/oci/core/models/image.rb +245 -0
- data/lib/oci/core/models/image_source_details.rb +134 -0
- data/lib/oci/core/models/image_source_via_object_storage_tuple_details.rb +150 -0
- data/lib/oci/core/models/image_source_via_object_storage_uri_details.rb +128 -0
- data/lib/oci/core/models/ingress_security_rule.rb +198 -0
- data/lib/oci/core/models/instance.rb +307 -0
- data/lib/oci/core/models/instance_console_connection.rb +193 -0
- data/lib/oci/core/models/instance_credentials.rb +131 -0
- data/lib/oci/core/models/internet_gateway.rb +210 -0
- data/lib/oci/core/models/ip_sec_connection.rb +223 -0
- data/lib/oci/core/models/ip_sec_connection_device_config.rb +153 -0
- data/lib/oci/core/models/ip_sec_connection_device_status.rb +156 -0
- data/lib/oci/core/models/launch_instance_details.rb +336 -0
- data/lib/oci/core/models/letter_of_authority.rb +194 -0
- data/lib/oci/core/models/port_range.rb +133 -0
- data/lib/oci/core/models/private_ip.rb +248 -0
- data/lib/oci/core/models/route_rule.rb +135 -0
- data/lib/oci/core/models/route_table.rb +208 -0
- data/lib/oci/core/models/security_list.rb +219 -0
- data/lib/oci/core/models/shape.rb +122 -0
- data/lib/oci/core/models/subnet.rb +351 -0
- data/lib/oci/core/models/tcp_options.rb +135 -0
- data/lib/oci/core/models/tunnel_config.rb +151 -0
- data/lib/oci/core/models/tunnel_status.rb +178 -0
- data/lib/oci/core/models/udp_options.rb +135 -0
- data/lib/oci/core/models/update_cpe_details.rb +122 -0
- data/lib/oci/core/models/update_cross_connect_details.rb +138 -0
- data/lib/oci/core/models/update_cross_connect_group_details.rb +122 -0
- data/lib/oci/core/models/update_dhcp_details.rb +132 -0
- data/lib/oci/core/models/update_drg_attachment_details.rb +122 -0
- data/lib/oci/core/models/update_drg_details.rb +122 -0
- data/lib/oci/core/models/update_image_details.rb +124 -0
- data/lib/oci/core/models/update_instance_details.rb +124 -0
- data/lib/oci/core/models/update_internet_gateway_details.rb +133 -0
- data/lib/oci/core/models/update_ip_sec_connection_details.rb +122 -0
- data/lib/oci/core/models/update_private_ip_details.rb +157 -0
- data/lib/oci/core/models/update_route_table_details.rb +133 -0
- data/lib/oci/core/models/update_security_list_details.rb +144 -0
- data/lib/oci/core/models/update_subnet_details.rb +122 -0
- data/lib/oci/core/models/update_vcn_details.rb +122 -0
- data/lib/oci/core/models/update_virtual_circuit_details.rb +240 -0
- data/lib/oci/core/models/update_vnic_details.rb +144 -0
- data/lib/oci/core/models/update_volume_backup_details.rb +122 -0
- data/lib/oci/core/models/update_volume_details.rb +122 -0
- data/lib/oci/core/models/vcn.rb +276 -0
- data/lib/oci/core/models/virtual_circuit.rb +395 -0
- data/lib/oci/core/models/virtual_circuit_bandwidth_shape.rb +137 -0
- data/lib/oci/core/models/vnic.rb +287 -0
- data/lib/oci/core/models/vnic_attachment.rb +250 -0
- data/lib/oci/core/models/volume.rb +210 -0
- data/lib/oci/core/models/volume_attachment.rb +246 -0
- data/lib/oci/core/models/volume_backup.rb +235 -0
- data/lib/oci/core/util.rb +1 -0
- data/lib/oci/core/virtual_network_client.rb +3421 -0
- data/lib/oci/errors.rb +78 -0
- data/lib/oci/global_context.rb +20 -0
- data/lib/oci/identity/identity.rb +55 -0
- data/lib/oci/identity/identity_client.rb +2148 -0
- data/lib/oci/identity/models/add_user_to_group_details.rb +131 -0
- data/lib/oci/identity/models/api_key.rb +211 -0
- data/lib/oci/identity/models/availability_domain.rb +131 -0
- data/lib/oci/identity/models/compartment.rb +211 -0
- data/lib/oci/identity/models/create_api_key_details.rb +120 -0
- data/lib/oci/identity/models/create_compartment_details.rb +145 -0
- data/lib/oci/identity/models/create_customer_secret_key_details.rb +121 -0
- data/lib/oci/identity/models/create_group_details.rb +144 -0
- data/lib/oci/identity/models/create_identity_provider_details.rb +215 -0
- data/lib/oci/identity/models/create_idp_group_mapping_details.rb +133 -0
- data/lib/oci/identity/models/create_policy_details.rb +173 -0
- data/lib/oci/identity/models/create_region_subscription_details.rb +128 -0
- data/lib/oci/identity/models/create_saml2_identity_provider_details.rb +154 -0
- data/lib/oci/identity/models/create_swift_password_details.rb +121 -0
- data/lib/oci/identity/models/create_user_details.rb +144 -0
- data/lib/oci/identity/models/customer_secret_key.rb +225 -0
- data/lib/oci/identity/models/customer_secret_key_summary.rb +213 -0
- data/lib/oci/identity/models/group.rb +211 -0
- data/lib/oci/identity/models/identity_provider.rb +261 -0
- data/lib/oci/identity/models/idp_group_mapping.rb +220 -0
- data/lib/oci/identity/models/policy.rb +237 -0
- data/lib/oci/identity/models/region.rb +143 -0
- data/lib/oci/identity/models/region_subscription.rb +180 -0
- data/lib/oci/identity/models/saml2_identity_provider.rb +180 -0
- data/lib/oci/identity/models/swift_password.rb +226 -0
- data/lib/oci/identity/models/tenancy.rb +159 -0
- data/lib/oci/identity/models/ui_password.rb +187 -0
- data/lib/oci/identity/models/update_compartment_details.rb +132 -0
- data/lib/oci/identity/models/update_customer_secret_key_details.rb +120 -0
- data/lib/oci/identity/models/update_group_details.rb +120 -0
- data/lib/oci/identity/models/update_identity_provider_details.rb +160 -0
- data/lib/oci/identity/models/update_idp_group_mapping_details.rb +131 -0
- data/lib/oci/identity/models/update_policy_details.rb +148 -0
- data/lib/oci/identity/models/update_saml2_identity_provider_details.rb +145 -0
- data/lib/oci/identity/models/update_state_details.rb +121 -0
- data/lib/oci/identity/models/update_swift_password_details.rb +120 -0
- data/lib/oci/identity/models/update_user_details.rb +120 -0
- data/lib/oci/identity/models/user.rb +217 -0
- data/lib/oci/identity/models/user_group_membership.rb +209 -0
- data/lib/oci/identity/util.rb +1 -0
- data/lib/oci/internal/internal.rb +10 -0
- data/lib/oci/internal/util.rb +69 -0
- data/lib/oci/load_balancer/load_balancer.rb +51 -0
- data/lib/oci/load_balancer/load_balancer_client.rb +1449 -0
- data/lib/oci/load_balancer/models/backend.rb +220 -0
- data/lib/oci/load_balancer/models/backend_details.rb +206 -0
- data/lib/oci/load_balancer/models/backend_health.rb +158 -0
- data/lib/oci/load_balancer/models/backend_set.rb +182 -0
- data/lib/oci/load_balancer/models/backend_set_details.rb +165 -0
- data/lib/oci/load_balancer/models/backend_set_health.rb +207 -0
- data/lib/oci/load_balancer/models/certificate.rb +169 -0
- data/lib/oci/load_balancer/models/certificate_details.rb +205 -0
- data/lib/oci/load_balancer/models/create_backend_details.rb +206 -0
- data/lib/oci/load_balancer/models/create_backend_set_details.rb +181 -0
- data/lib/oci/load_balancer/models/create_certificate_details.rb +205 -0
- data/lib/oci/load_balancer/models/create_listener_details.rb +175 -0
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +220 -0
- data/lib/oci/load_balancer/models/health_check_result.rb +183 -0
- data/lib/oci/load_balancer/models/health_checker.rb +224 -0
- data/lib/oci/load_balancer/models/health_checker_details.rb +223 -0
- data/lib/oci/load_balancer/models/ip_address.rb +139 -0
- data/lib/oci/load_balancer/models/listener.rb +174 -0
- data/lib/oci/load_balancer/models/listener_details.rb +160 -0
- data/lib/oci/load_balancer/models/load_balancer.rb +280 -0
- data/lib/oci/load_balancer/models/load_balancer_health.rb +215 -0
- data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +168 -0
- data/lib/oci/load_balancer/models/load_balancer_policy.rb +120 -0
- data/lib/oci/load_balancer/models/load_balancer_protocol.rb +120 -0
- data/lib/oci/load_balancer/models/load_balancer_shape.rb +120 -0
- data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +141 -0
- data/lib/oci/load_balancer/models/ssl_configuration.rb +155 -0
- data/lib/oci/load_balancer/models/ssl_configuration_details.rb +155 -0
- data/lib/oci/load_balancer/models/update_backend_details.rb +178 -0
- data/lib/oci/load_balancer/models/update_backend_set_details.rb +165 -0
- data/lib/oci/load_balancer/models/update_health_checker_details.rb +222 -0
- data/lib/oci/load_balancer/models/update_listener_details.rb +160 -0
- data/lib/oci/load_balancer/models/update_load_balancer_details.rb +124 -0
- data/lib/oci/load_balancer/models/work_request.rb +229 -0
- data/lib/oci/load_balancer/models/work_request_error.rb +145 -0
- data/lib/oci/load_balancer/util.rb +58 -0
- data/lib/oci/object_storage/models/bucket.rb +216 -0
- data/lib/oci/object_storage/models/bucket_summary.rb +175 -0
- data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +133 -0
- data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +131 -0
- data/lib/oci/object_storage/models/create_bucket_details.rb +173 -0
- data/lib/oci/object_storage/models/create_multipart_upload_details.rb +166 -0
- data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +171 -0
- data/lib/oci/object_storage/models/list_objects.rb +146 -0
- data/lib/oci/object_storage/models/multipart_upload.rb +164 -0
- data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +153 -0
- data/lib/oci/object_storage/models/object_summary.rb +153 -0
- data/lib/oci/object_storage/models/preauthenticated_request.rb +207 -0
- data/lib/oci/object_storage/models/preauthenticated_request_summary.rb +196 -0
- data/lib/oci/object_storage/models/update_bucket_details.rb +171 -0
- data/lib/oci/object_storage/object_storage.rb +30 -0
- data/lib/oci/object_storage/object_storage_client.rb +1185 -0
- data/lib/oci/object_storage/util.rb +1 -0
- data/lib/oci/regions.rb +43 -0
- data/lib/oci/response.rb +80 -0
- data/lib/oci/response_headers.rb +144 -0
- data/lib/oci/signer.rb +157 -0
- data/lib/oci/version.rb +5 -0
- data/lib/oci/waiter.rb +101 -0
- data/lib/oraclebmc.rb +3 -0
- metadata +375 -0
@@ -0,0 +1,190 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
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, or 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 BGP 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
|
+
if attributes[:'bgpMd5AuthKey']
|
63
|
+
self.bgp_md5_auth_key = attributes[:'bgpMd5AuthKey']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes[:'crossConnectOrCrossConnectGroupId']
|
67
|
+
self.cross_connect_or_cross_connect_group_id = attributes[:'crossConnectOrCrossConnectGroupId']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes[:'customerBgpPeeringIp']
|
71
|
+
self.customer_bgp_peering_ip = attributes[:'customerBgpPeeringIp']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes[:'oracleBgpPeeringIp']
|
75
|
+
self.oracle_bgp_peering_ip = attributes[:'oracleBgpPeeringIp']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes[:'vlan']
|
79
|
+
self.vlan = attributes[:'vlan']
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
83
|
+
|
84
|
+
# Checks equality by comparing each attribute.
|
85
|
+
# @param [Object] other_object to be compared
|
86
|
+
def ==(other_object)
|
87
|
+
return true if self.equal?(other_object)
|
88
|
+
self.class == other_object.class &&
|
89
|
+
bgp_md5_auth_key == other_object.bgp_md5_auth_key &&
|
90
|
+
cross_connect_or_cross_connect_group_id == other_object.cross_connect_or_cross_connect_group_id &&
|
91
|
+
customer_bgp_peering_ip == other_object.customer_bgp_peering_ip &&
|
92
|
+
oracle_bgp_peering_ip == other_object.oracle_bgp_peering_ip &&
|
93
|
+
vlan == other_object.vlan
|
94
|
+
end
|
95
|
+
|
96
|
+
# @see the `==` method
|
97
|
+
# @param [Object] other_object to be compared
|
98
|
+
def eql?(other_object)
|
99
|
+
self == other_object
|
100
|
+
end
|
101
|
+
|
102
|
+
# Calculates hash code according to all attributes.
|
103
|
+
# @return [Fixnum] Hash code
|
104
|
+
def hash
|
105
|
+
[bgp_md5_auth_key, cross_connect_or_cross_connect_group_id, customer_bgp_peering_ip, oracle_bgp_peering_ip, vlan].hash
|
106
|
+
end
|
107
|
+
|
108
|
+
# Builds the object from hash
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
110
|
+
# @return [Object] Returns the model itself
|
111
|
+
def build_from_hash(attributes)
|
112
|
+
return nil unless attributes.is_a?(Hash)
|
113
|
+
self.class.swagger_types.each_pair do |key, type|
|
114
|
+
if type =~ /^Array<(.*)>/i
|
115
|
+
# check to ensure the input is an array given that the the attribute
|
116
|
+
# is documented as an array but the input is not
|
117
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
118
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
119
|
+
end
|
120
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
121
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
122
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
123
|
+
end
|
124
|
+
|
125
|
+
self
|
126
|
+
end
|
127
|
+
|
128
|
+
# Returns the string representation of the object
|
129
|
+
# @return [String] String presentation of the object
|
130
|
+
def to_s
|
131
|
+
to_hash.to_s
|
132
|
+
end
|
133
|
+
|
134
|
+
# Returns the object in the form of hash
|
135
|
+
# @return [Hash] Returns the object in the form of hash
|
136
|
+
def to_hash
|
137
|
+
hash = {}
|
138
|
+
self.class.attribute_map.each_pair do |attr, param|
|
139
|
+
value = self.send(attr)
|
140
|
+
next if value.nil?
|
141
|
+
hash[param] = _to_hash(value)
|
142
|
+
end
|
143
|
+
hash
|
144
|
+
end
|
145
|
+
|
146
|
+
private
|
147
|
+
|
148
|
+
# Outputs non-array value in the form of hash
|
149
|
+
# For object, use to_hash. Otherwise, just return the value
|
150
|
+
# @param [Object] value Any valid value
|
151
|
+
# @return [Hash] Returns the value in the form of hash
|
152
|
+
def _to_hash(value)
|
153
|
+
if value.is_a?(Array)
|
154
|
+
value.compact.map{ |v| _to_hash(v) }
|
155
|
+
elsif value.is_a?(Hash)
|
156
|
+
{}.tap do |hash|
|
157
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
158
|
+
end
|
159
|
+
elsif value.respond_to? :to_hash
|
160
|
+
value.to_hash
|
161
|
+
else
|
162
|
+
value
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
169
|
+
def self.attribute_map
|
170
|
+
{
|
171
|
+
:'bgp_md5_auth_key' => :'bgpMd5AuthKey',
|
172
|
+
:'cross_connect_or_cross_connect_group_id' => :'crossConnectOrCrossConnectGroupId',
|
173
|
+
:'customer_bgp_peering_ip' => :'customerBgpPeeringIp',
|
174
|
+
:'oracle_bgp_peering_ip' => :'oracleBgpPeeringIp',
|
175
|
+
:'vlan' => :'vlan'
|
176
|
+
}
|
177
|
+
end
|
178
|
+
|
179
|
+
# Attribute type mapping.
|
180
|
+
def self.swagger_types
|
181
|
+
{
|
182
|
+
:'bgp_md5_auth_key' => :'String',
|
183
|
+
:'cross_connect_or_cross_connect_group_id' => :'String',
|
184
|
+
:'customer_bgp_peering_ip' => :'String',
|
185
|
+
:'oracle_bgp_peering_ip' => :'String',
|
186
|
+
:'vlan' => :'Integer'
|
187
|
+
}
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
@@ -0,0 +1,137 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
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| OCI::Internal::Util.convert_to_type($1, v) } )
|
72
|
+
end
|
73
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
74
|
+
self.send("#{key}=", OCI::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
|
@@ -0,0 +1,200 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
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| OCI::Internal::Util.convert_to_type($1, v) } )
|
131
|
+
end
|
132
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
133
|
+
self.send("#{key}=", OCI::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
|