oraclebmc 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a0960b9d34e1a8ad853cdf82beb2fd48a26f970
|
4
|
+
data.tar.gz: 46b801ec78590b2aac47fb8507d9c6ddaae0fb57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a044b43dffe75862979d26e2325ea155b932b952c0230b00cffc207f75ea3f88a85cf64350a32db52045bfcaef25bdfaa9c7c231e6f10c0cdfd2bde8209790f
|
7
|
+
data.tar.gz: 859b43d68c44f6db7a2818ccec36727134dd7d43855b73258f51b74bd1d57e4b0200426057695df5c8f33ac0cd06a610cca2a0cc85abfd96f02426444c98ad00
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Oracle Bare Metal Cloud Services Ruby SDK
|
2
|
-
**Version 1.2.
|
2
|
+
**Version 1.2.2**
|
3
3
|
|
4
4
|
This topic describes how to install, configure, and use the Oracle Bare Metal Cloud Services Ruby SDK.
|
5
5
|
|
@@ -77,7 +77,7 @@ You can also [download the SDK](https://docs.us-phoenix-1.oraclecloud.com/tools/
|
|
77
77
|
Install the gem with the following command:
|
78
78
|
|
79
79
|
|
80
|
-
`gem install oraclebmc-1.2.
|
80
|
+
`gem install oraclebmc-1.2.2.gem`
|
81
81
|
|
82
82
|
|
83
83
|
The SDK depends on `libcurl`, which may need to be installed or upgraded on some operating systems to be compatible with Oracle Bare Metal Cloud Services.
|
@@ -100,6 +100,9 @@ To use any of the APIs, you must supply a {OracleBMC::Config Config} object. You
|
|
100
100
|
* Required credentials and settings: See [SDK and Tool Configuration](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/sdkconfig.htm) in the User Guide.
|
101
101
|
* Optional SDK-specific settings: See the {OracleBMC::Config Config} object for the full list of config options.
|
102
102
|
|
103
|
+
## Forward Compatibility
|
104
|
+
|
105
|
+
Some response fields are enum-typed. In the future, individual services may return values not covered by existing enums for that field. To address this possibility, every enum-type response field has an additional value named "UNKNOWN_ENUM_VALUE". If a service returns a value that is not recognized by your version of the SDK, then the response field will be set to this value. Please ensure that your code handles the "UNKNOWN_ENUM_VALUE" case if you have conditional logic based on an enum-typed field.
|
103
106
|
|
104
107
|
## Writing Your First Ruby Program with the SDK
|
105
108
|
|
@@ -256,3 +259,4 @@ Ways to get in touch:
|
|
256
259
|
* [My Oracle Support](https://support.oracle.com)
|
257
260
|
|
258
261
|
|
262
|
+
|
@@ -60,9 +60,9 @@ module OracleBMC
|
|
60
60
|
# For general information about block volumes, see
|
61
61
|
# [Overview of Block Volume Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/overview.htm).
|
62
62
|
#
|
63
|
-
# A volume and instance can be in separate compartments but must be in the same Availability Domain.
|
63
|
+
# A volume and instance can be in separate compartments but must be in the same Availability Domain.
|
64
64
|
# For information about access control and compartments, see
|
65
|
-
# [Overview of the IAM Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). For information about
|
65
|
+
# [Overview of the IAM Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm). For information about
|
66
66
|
# Availability Domains, see [Regions and Availability Domains](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm).
|
67
67
|
# To get a list of Availability Domains, use the `ListAvailabilityDomains` operation
|
68
68
|
# in the Identity and Access Management Service API.
|
@@ -96,7 +96,7 @@ module OracleBMC
|
|
96
96
|
end
|
97
97
|
|
98
98
|
# Captures the most recent serial console data (up to a megabyte) for the
|
99
|
-
# specified instance.
|
99
|
+
# specified instance.
|
100
100
|
#
|
101
101
|
# The `CaptureConsoleHistory` operation works with the other console history operations
|
102
102
|
# as described below.
|
@@ -516,7 +516,7 @@ module OracleBMC
|
|
516
516
|
#
|
517
517
|
# Note that the **stop** state has no effect on the resources you consume.
|
518
518
|
# Billing continues for instances that you stop, and related resources continue
|
519
|
-
# to apply against any relevant quotas. You must terminate an instance
|
519
|
+
# to apply against any relevant quotas. You must terminate an instance
|
520
520
|
# ({#terminate_instance terminate_instance})
|
521
521
|
# to remove its resources from billing and quotas.
|
522
522
|
#
|
@@ -569,7 +569,7 @@ module OracleBMC
|
|
569
569
|
end
|
570
570
|
|
571
571
|
# Creates a new instance in the specified compartment and the specified Availability Domain.
|
572
|
-
# For general information about instances, see
|
572
|
+
# For general information about instances, see
|
573
573
|
# [Overview of the Compute Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Concepts/computeoverview.htm).
|
574
574
|
#
|
575
575
|
# For information about access control and compartments, see
|
@@ -587,8 +587,9 @@ module OracleBMC
|
|
587
587
|
# on that resource type, or by viewing the resource in the Console.
|
588
588
|
#
|
589
589
|
# When you launch an instance, it is automatically attached to a Virtual
|
590
|
-
# Network Interface Card (VNIC)
|
591
|
-
#
|
590
|
+
# Network Interface Card (VNIC). The VNIC has a private IP address from
|
591
|
+
# the subnet's CIDR, and optionally a public IP address.
|
592
|
+
# To get the addresses, use the {#list_vnic_attachments list_vnic_attachments}
|
592
593
|
# operation to get the VNIC ID for the instance, and then call
|
593
594
|
# {#get_vnic get_vnic} with the VNIC ID.
|
594
595
|
#
|
@@ -677,7 +678,7 @@ module OracleBMC
|
|
677
678
|
:return_type => 'Array<OracleBMC::Core::Models::ConsoleHistory>')
|
678
679
|
end
|
679
680
|
|
680
|
-
# Lists the available images in the specified compartment. For more
|
681
|
+
# Lists the available images in the specified compartment. For more
|
681
682
|
# information about images, see
|
682
683
|
# [Managing Custom Images](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/Tasks/managingcustomimages.htm).
|
683
684
|
#
|
@@ -788,7 +789,7 @@ module OracleBMC
|
|
788
789
|
:return_type => 'Array<OracleBMC::Core::Models::Instance>')
|
789
790
|
end
|
790
791
|
|
791
|
-
# Lists the shapes that can be used to launch an instance within the specified compartment. You can
|
792
|
+
# Lists the shapes that can be used to launch an instance within the specified compartment. You can
|
792
793
|
# filter the list by compatibility with a specific image.
|
793
794
|
#
|
794
795
|
# @param [String] compartment_id The OCID of the compartment.
|
data/lib/oraclebmc/core/core.rb
CHANGED
@@ -14,6 +14,8 @@ require 'oraclebmc/core/models/capture_console_history_details'
|
|
14
14
|
require 'oraclebmc/core/models/console_history'
|
15
15
|
require 'oraclebmc/core/models/cpe'
|
16
16
|
require 'oraclebmc/core/models/create_cpe_details'
|
17
|
+
require 'oraclebmc/core/models/create_cross_connect_details'
|
18
|
+
require 'oraclebmc/core/models/create_cross_connect_group_details'
|
17
19
|
require 'oraclebmc/core/models/create_dhcp_details'
|
18
20
|
require 'oraclebmc/core/models/create_drg_attachment_details'
|
19
21
|
require 'oraclebmc/core/models/create_drg_details'
|
@@ -24,8 +26,16 @@ require 'oraclebmc/core/models/create_route_table_details'
|
|
24
26
|
require 'oraclebmc/core/models/create_security_list_details'
|
25
27
|
require 'oraclebmc/core/models/create_subnet_details'
|
26
28
|
require 'oraclebmc/core/models/create_vcn_details'
|
29
|
+
require 'oraclebmc/core/models/create_virtual_circuit_details'
|
30
|
+
require 'oraclebmc/core/models/create_vnic_details'
|
27
31
|
require 'oraclebmc/core/models/create_volume_backup_details'
|
28
32
|
require 'oraclebmc/core/models/create_volume_details'
|
33
|
+
require 'oraclebmc/core/models/cross_connect'
|
34
|
+
require 'oraclebmc/core/models/cross_connect_group'
|
35
|
+
require 'oraclebmc/core/models/cross_connect_location'
|
36
|
+
require 'oraclebmc/core/models/cross_connect_mapping'
|
37
|
+
require 'oraclebmc/core/models/cross_connect_port_speed_shape'
|
38
|
+
require 'oraclebmc/core/models/cross_connect_status'
|
29
39
|
require 'oraclebmc/core/models/dhcp_dns_option'
|
30
40
|
require 'oraclebmc/core/models/dhcp_option'
|
31
41
|
require 'oraclebmc/core/models/dhcp_options'
|
@@ -33,6 +43,7 @@ require 'oraclebmc/core/models/dhcp_search_domain_option'
|
|
33
43
|
require 'oraclebmc/core/models/drg'
|
34
44
|
require 'oraclebmc/core/models/drg_attachment'
|
35
45
|
require 'oraclebmc/core/models/egress_security_rule'
|
46
|
+
require 'oraclebmc/core/models/fast_connect_provider_service'
|
36
47
|
require 'oraclebmc/core/models/ip_sec_connection'
|
37
48
|
require 'oraclebmc/core/models/ip_sec_connection_device_config'
|
38
49
|
require 'oraclebmc/core/models/ip_sec_connection_device_status'
|
@@ -44,6 +55,7 @@ require 'oraclebmc/core/models/instance'
|
|
44
55
|
require 'oraclebmc/core/models/instance_credentials'
|
45
56
|
require 'oraclebmc/core/models/internet_gateway'
|
46
57
|
require 'oraclebmc/core/models/launch_instance_details'
|
58
|
+
require 'oraclebmc/core/models/letter_of_authority'
|
47
59
|
require 'oraclebmc/core/models/port_range'
|
48
60
|
require 'oraclebmc/core/models/route_rule'
|
49
61
|
require 'oraclebmc/core/models/route_table'
|
@@ -55,6 +67,8 @@ require 'oraclebmc/core/models/tunnel_config'
|
|
55
67
|
require 'oraclebmc/core/models/tunnel_status'
|
56
68
|
require 'oraclebmc/core/models/udp_options'
|
57
69
|
require 'oraclebmc/core/models/update_cpe_details'
|
70
|
+
require 'oraclebmc/core/models/update_cross_connect_details'
|
71
|
+
require 'oraclebmc/core/models/update_cross_connect_group_details'
|
58
72
|
require 'oraclebmc/core/models/update_dhcp_details'
|
59
73
|
require 'oraclebmc/core/models/update_drg_attachment_details'
|
60
74
|
require 'oraclebmc/core/models/update_drg_details'
|
@@ -66,9 +80,12 @@ require 'oraclebmc/core/models/update_route_table_details'
|
|
66
80
|
require 'oraclebmc/core/models/update_security_list_details'
|
67
81
|
require 'oraclebmc/core/models/update_subnet_details'
|
68
82
|
require 'oraclebmc/core/models/update_vcn_details'
|
83
|
+
require 'oraclebmc/core/models/update_virtual_circuit_details'
|
69
84
|
require 'oraclebmc/core/models/update_volume_backup_details'
|
70
85
|
require 'oraclebmc/core/models/update_volume_details'
|
71
86
|
require 'oraclebmc/core/models/vcn'
|
87
|
+
require 'oraclebmc/core/models/virtual_circuit'
|
88
|
+
require 'oraclebmc/core/models/virtual_circuit_bandwidth_shape'
|
72
89
|
require 'oraclebmc/core/models/vnic'
|
73
90
|
require 'oraclebmc/core/models/vnic_attachment'
|
74
91
|
require 'oraclebmc/core/models/volume'
|
@@ -0,0 +1,203 @@
|
|
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::CreateCrossConnectDetails
|
7
|
+
# The OCID of the compartment to contain the cross-connect.
|
8
|
+
# @return [String]
|
9
|
+
attr_accessor :compartment_id
|
10
|
+
|
11
|
+
# The OCID of the cross-connect group to put this cross-connect in.
|
12
|
+
# @return [String]
|
13
|
+
attr_accessor :cross_connect_group_id
|
14
|
+
|
15
|
+
# A user-friendly name. Does not have to be unique, and it's changeable.
|
16
|
+
# @return [String]
|
17
|
+
attr_accessor :display_name
|
18
|
+
|
19
|
+
# If you already have an existing cross-connect or cross-connect group at this FastConnect
|
20
|
+
# location, and you want this new cross-connect to be on a different router (for the
|
21
|
+
# purposes of redundancy), provide the OCID of that existing cross-connect or
|
22
|
+
# cross-connect group.
|
23
|
+
#
|
24
|
+
# @return [String]
|
25
|
+
attr_accessor :far_cross_connect_or_cross_connect_group_id
|
26
|
+
|
27
|
+
# The name of the FastConnect location where this cross-connect will be installed.
|
28
|
+
# To get a list of the available locations, see
|
29
|
+
# {#list_cross_connect_locations list_cross_connect_locations}.
|
30
|
+
#
|
31
|
+
# Example: `CyrusOne, Chandler, AZ`
|
32
|
+
#
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :location_name
|
35
|
+
|
36
|
+
# If you already have an existing cross-connect or cross-connect group at this FastConnect
|
37
|
+
# location, and you want this new cross-connect to be on the same router, provide the
|
38
|
+
# OCID of that existing cross-connect or cross-connect group.
|
39
|
+
#
|
40
|
+
# @return [String]
|
41
|
+
attr_accessor :near_cross_connect_or_cross_connect_group_id
|
42
|
+
|
43
|
+
# The port speed for this cross-connect. To get a list of the available port speeds, see
|
44
|
+
# {#list_crossconnect_port_speed_shapes list_crossconnect_port_speed_shapes}.
|
45
|
+
#
|
46
|
+
# Example: `10 Gbps`
|
47
|
+
#
|
48
|
+
# @return [String]
|
49
|
+
attr_accessor :port_speed_shape_name
|
50
|
+
|
51
|
+
|
52
|
+
# Initializes the object
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
54
|
+
def initialize(attributes = {})
|
55
|
+
return unless attributes.is_a?(Hash)
|
56
|
+
|
57
|
+
# convert string to symbol for hash key
|
58
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
59
|
+
|
60
|
+
|
61
|
+
if attributes[:'compartmentId']
|
62
|
+
self.compartment_id = attributes[:'compartmentId']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes[:'crossConnectGroupId']
|
66
|
+
self.cross_connect_group_id = attributes[:'crossConnectGroupId']
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes[:'displayName']
|
70
|
+
self.display_name = attributes[:'displayName']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes[:'farCrossConnectOrCrossConnectGroupId']
|
74
|
+
self.far_cross_connect_or_cross_connect_group_id = attributes[:'farCrossConnectOrCrossConnectGroupId']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes[:'locationName']
|
78
|
+
self.location_name = attributes[:'locationName']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes[:'nearCrossConnectOrCrossConnectGroupId']
|
82
|
+
self.near_cross_connect_or_cross_connect_group_id = attributes[:'nearCrossConnectOrCrossConnectGroupId']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes[:'portSpeedShapeName']
|
86
|
+
self.port_speed_shape_name = attributes[:'portSpeedShapeName']
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
90
|
+
|
91
|
+
# Checks equality by comparing each attribute.
|
92
|
+
# @param [Object] other_object to be compared
|
93
|
+
def ==(other_object)
|
94
|
+
return true if self.equal?(other_object)
|
95
|
+
self.class == other_object.class &&
|
96
|
+
compartment_id == other_object.compartment_id &&
|
97
|
+
cross_connect_group_id == other_object.cross_connect_group_id &&
|
98
|
+
display_name == other_object.display_name &&
|
99
|
+
far_cross_connect_or_cross_connect_group_id == other_object.far_cross_connect_or_cross_connect_group_id &&
|
100
|
+
location_name == other_object.location_name &&
|
101
|
+
near_cross_connect_or_cross_connect_group_id == other_object.near_cross_connect_or_cross_connect_group_id &&
|
102
|
+
port_speed_shape_name == other_object.port_speed_shape_name
|
103
|
+
end
|
104
|
+
|
105
|
+
# @see the `==` method
|
106
|
+
# @param [Object] other_object to be compared
|
107
|
+
def eql?(other_object)
|
108
|
+
self == other_object
|
109
|
+
end
|
110
|
+
|
111
|
+
# Calculates hash code according to all attributes.
|
112
|
+
# @return [Fixnum] Hash code
|
113
|
+
def hash
|
114
|
+
[compartment_id, cross_connect_group_id, display_name, far_cross_connect_or_cross_connect_group_id, location_name, near_cross_connect_or_cross_connect_group_id, port_speed_shape_name].hash
|
115
|
+
end
|
116
|
+
|
117
|
+
# Builds the object from hash
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
119
|
+
# @return [Object] Returns the model itself
|
120
|
+
def build_from_hash(attributes)
|
121
|
+
return nil unless attributes.is_a?(Hash)
|
122
|
+
self.class.swagger_types.each_pair do |key, type|
|
123
|
+
if type =~ /^Array<(.*)>/i
|
124
|
+
# check to ensure the input is an array given that the the attribute
|
125
|
+
# is documented as an array but the input is not
|
126
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
127
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
128
|
+
end
|
129
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
130
|
+
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
131
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
132
|
+
end
|
133
|
+
|
134
|
+
self
|
135
|
+
end
|
136
|
+
|
137
|
+
# Returns the string representation of the object
|
138
|
+
# @return [String] String presentation of the object
|
139
|
+
def to_s
|
140
|
+
to_hash.to_s
|
141
|
+
end
|
142
|
+
|
143
|
+
# Returns the object in the form of hash
|
144
|
+
# @return [Hash] Returns the object in the form of hash
|
145
|
+
def to_hash
|
146
|
+
hash = {}
|
147
|
+
self.class.attribute_map.each_pair do |attr, param|
|
148
|
+
value = self.send(attr)
|
149
|
+
next if value.nil?
|
150
|
+
hash[param] = _to_hash(value)
|
151
|
+
end
|
152
|
+
hash
|
153
|
+
end
|
154
|
+
|
155
|
+
private
|
156
|
+
|
157
|
+
# Outputs non-array value in the form of hash
|
158
|
+
# For object, use to_hash. Otherwise, just return the value
|
159
|
+
# @param [Object] value Any valid value
|
160
|
+
# @return [Hash] Returns the value in the form of hash
|
161
|
+
def _to_hash(value)
|
162
|
+
if value.is_a?(Array)
|
163
|
+
value.compact.map{ |v| _to_hash(v) }
|
164
|
+
elsif value.is_a?(Hash)
|
165
|
+
{}.tap do |hash|
|
166
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
167
|
+
end
|
168
|
+
elsif value.respond_to? :to_hash
|
169
|
+
value.to_hash
|
170
|
+
else
|
171
|
+
value
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
178
|
+
def self.attribute_map
|
179
|
+
{
|
180
|
+
:'compartment_id' => :'compartmentId',
|
181
|
+
:'cross_connect_group_id' => :'crossConnectGroupId',
|
182
|
+
:'display_name' => :'displayName',
|
183
|
+
:'far_cross_connect_or_cross_connect_group_id' => :'farCrossConnectOrCrossConnectGroupId',
|
184
|
+
:'location_name' => :'locationName',
|
185
|
+
:'near_cross_connect_or_cross_connect_group_id' => :'nearCrossConnectOrCrossConnectGroupId',
|
186
|
+
:'port_speed_shape_name' => :'portSpeedShapeName'
|
187
|
+
}
|
188
|
+
end
|
189
|
+
|
190
|
+
# Attribute type mapping.
|
191
|
+
def self.swagger_types
|
192
|
+
{
|
193
|
+
:'compartment_id' => :'String',
|
194
|
+
:'cross_connect_group_id' => :'String',
|
195
|
+
:'display_name' => :'String',
|
196
|
+
:'far_cross_connect_or_cross_connect_group_id' => :'String',
|
197
|
+
:'location_name' => :'String',
|
198
|
+
:'near_cross_connect_or_cross_connect_group_id' => :'String',
|
199
|
+
:'port_speed_shape_name' => :'String'
|
200
|
+
}
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
@@ -0,0 +1,132 @@
|
|
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::CreateCrossConnectGroupDetails
|
7
|
+
# The OCID of the compartment to contain the cross-connect group.
|
8
|
+
# @return [String]
|
9
|
+
attr_accessor :compartment_id
|
10
|
+
|
11
|
+
# A user-friendly name. Does not have to be unique, and it's changeable.
|
12
|
+
# @return [String]
|
13
|
+
attr_accessor :display_name
|
14
|
+
|
15
|
+
|
16
|
+
# Initializes the object
|
17
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
18
|
+
def initialize(attributes = {})
|
19
|
+
return unless attributes.is_a?(Hash)
|
20
|
+
|
21
|
+
# convert string to symbol for hash key
|
22
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
23
|
+
|
24
|
+
|
25
|
+
if attributes[:'compartmentId']
|
26
|
+
self.compartment_id = attributes[:'compartmentId']
|
27
|
+
end
|
28
|
+
|
29
|
+
if attributes[:'displayName']
|
30
|
+
self.display_name = attributes[:'displayName']
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
# Checks equality by comparing each attribute.
|
36
|
+
# @param [Object] other_object to be compared
|
37
|
+
def ==(other_object)
|
38
|
+
return true if self.equal?(other_object)
|
39
|
+
self.class == other_object.class &&
|
40
|
+
compartment_id == other_object.compartment_id &&
|
41
|
+
display_name == other_object.display_name
|
42
|
+
end
|
43
|
+
|
44
|
+
# @see the `==` method
|
45
|
+
# @param [Object] other_object to be compared
|
46
|
+
def eql?(other_object)
|
47
|
+
self == other_object
|
48
|
+
end
|
49
|
+
|
50
|
+
# Calculates hash code according to all attributes.
|
51
|
+
# @return [Fixnum] Hash code
|
52
|
+
def hash
|
53
|
+
[compartment_id, display_name].hash
|
54
|
+
end
|
55
|
+
|
56
|
+
# Builds the object from hash
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
58
|
+
# @return [Object] Returns the model itself
|
59
|
+
def build_from_hash(attributes)
|
60
|
+
return nil unless attributes.is_a?(Hash)
|
61
|
+
self.class.swagger_types.each_pair do |key, type|
|
62
|
+
if type =~ /^Array<(.*)>/i
|
63
|
+
# check to ensure the input is an array given that the the attribute
|
64
|
+
# is documented as an array but the input is not
|
65
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
66
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
|
67
|
+
end
|
68
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
69
|
+
self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
70
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
71
|
+
end
|
72
|
+
|
73
|
+
self
|
74
|
+
end
|
75
|
+
|
76
|
+
# Returns the string representation of the object
|
77
|
+
# @return [String] String presentation of the object
|
78
|
+
def to_s
|
79
|
+
to_hash.to_s
|
80
|
+
end
|
81
|
+
|
82
|
+
# Returns the object in the form of hash
|
83
|
+
# @return [Hash] Returns the object in the form of hash
|
84
|
+
def to_hash
|
85
|
+
hash = {}
|
86
|
+
self.class.attribute_map.each_pair do |attr, param|
|
87
|
+
value = self.send(attr)
|
88
|
+
next if value.nil?
|
89
|
+
hash[param] = _to_hash(value)
|
90
|
+
end
|
91
|
+
hash
|
92
|
+
end
|
93
|
+
|
94
|
+
private
|
95
|
+
|
96
|
+
# Outputs non-array value in the form of hash
|
97
|
+
# For object, use to_hash. Otherwise, just return the value
|
98
|
+
# @param [Object] value Any valid value
|
99
|
+
# @return [Hash] Returns the value in the form of hash
|
100
|
+
def _to_hash(value)
|
101
|
+
if value.is_a?(Array)
|
102
|
+
value.compact.map{ |v| _to_hash(v) }
|
103
|
+
elsif value.is_a?(Hash)
|
104
|
+
{}.tap do |hash|
|
105
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
106
|
+
end
|
107
|
+
elsif value.respond_to? :to_hash
|
108
|
+
value.to_hash
|
109
|
+
else
|
110
|
+
value
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
117
|
+
def self.attribute_map
|
118
|
+
{
|
119
|
+
:'compartment_id' => :'compartmentId',
|
120
|
+
:'display_name' => :'displayName'
|
121
|
+
}
|
122
|
+
end
|
123
|
+
|
124
|
+
# Attribute type mapping.
|
125
|
+
def self.swagger_types
|
126
|
+
{
|
127
|
+
:'compartment_id' => :'String',
|
128
|
+
:'display_name' => :'String'
|
129
|
+
}
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|