oraclebmc 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -2
  3. data/lib/oraclebmc/core/blockstorage_client.rb +2 -2
  4. data/lib/oraclebmc/core/compute_client.rb +8 -7
  5. data/lib/oraclebmc/core/core.rb +17 -0
  6. data/lib/oraclebmc/core/models/create_cross_connect_details.rb +203 -0
  7. data/lib/oraclebmc/core/models/create_cross_connect_group_details.rb +132 -0
  8. data/lib/oraclebmc/core/models/create_subnet_details.rb +24 -3
  9. data/lib/oraclebmc/core/models/create_vcn_details.rb +2 -2
  10. data/lib/oraclebmc/core/models/create_virtual_circuit_details.rb +261 -0
  11. data/lib/oraclebmc/core/models/create_vnic_details.rb +202 -0
  12. data/lib/oraclebmc/core/models/cross_connect.rb +234 -0
  13. data/lib/oraclebmc/core/models/cross_connect_group.rb +187 -0
  14. data/lib/oraclebmc/core/models/cross_connect_location.rb +135 -0
  15. data/lib/oraclebmc/core/models/cross_connect_mapping.rb +191 -0
  16. data/lib/oraclebmc/core/models/cross_connect_port_speed_shape.rb +138 -0
  17. data/lib/oraclebmc/core/models/cross_connect_status.rb +201 -0
  18. data/lib/oraclebmc/core/models/dhcp_dns_option.rb +7 -7
  19. data/lib/oraclebmc/core/models/dhcp_option.rb +1 -1
  20. data/lib/oraclebmc/core/models/dhcp_search_domain_option.rb +6 -7
  21. data/lib/oraclebmc/core/models/fast_connect_provider_service.rb +146 -0
  22. data/lib/oraclebmc/core/models/image.rb +1 -1
  23. data/lib/oraclebmc/core/models/instance.rb +6 -7
  24. data/lib/oraclebmc/core/models/launch_instance_details.rb +22 -19
  25. data/lib/oraclebmc/core/models/letter_of_authority.rb +195 -0
  26. data/lib/oraclebmc/core/models/subnet.rb +26 -5
  27. data/lib/oraclebmc/core/models/update_cross_connect_details.rb +137 -0
  28. data/lib/oraclebmc/core/models/update_cross_connect_group_details.rb +121 -0
  29. data/lib/oraclebmc/core/models/update_virtual_circuit_details.rb +240 -0
  30. data/lib/oraclebmc/core/models/vcn.rb +4 -4
  31. data/lib/oraclebmc/core/models/virtual_circuit.rb +395 -0
  32. data/lib/oraclebmc/core/models/virtual_circuit_bandwidth_shape.rb +138 -0
  33. data/lib/oraclebmc/core/models/vnic.rb +4 -4
  34. data/lib/oraclebmc/core/virtual_network_client.rb +962 -85
  35. data/lib/oraclebmc/identity/identity.rb +13 -0
  36. data/lib/oraclebmc/identity/identity_client.rb +533 -8
  37. data/lib/oraclebmc/identity/models/create_identity_provider_details.rb +213 -0
  38. data/lib/oraclebmc/identity/models/create_idp_group_mapping_details.rb +134 -0
  39. data/lib/oraclebmc/identity/models/create_region_subscription_details.rb +128 -0
  40. data/lib/oraclebmc/identity/models/create_saml2_identity_provider_details.rb +155 -0
  41. data/lib/oraclebmc/identity/models/create_user_details.rb +1 -1
  42. data/lib/oraclebmc/identity/models/identity_provider.rb +257 -0
  43. data/lib/oraclebmc/identity/models/idp_group_mapping.rb +221 -0
  44. data/lib/oraclebmc/identity/models/region.rb +142 -0
  45. data/lib/oraclebmc/identity/models/region_subscription.rb +179 -0
  46. data/lib/oraclebmc/identity/models/saml2_identity_provider.rb +181 -0
  47. data/lib/oraclebmc/identity/models/tenancy.rb +159 -0
  48. data/lib/oraclebmc/identity/models/update_identity_provider_details.rb +161 -0
  49. data/lib/oraclebmc/identity/models/update_idp_group_mapping_details.rb +132 -0
  50. data/lib/oraclebmc/identity/models/update_saml2_identity_provider_details.rb +146 -0
  51. data/lib/oraclebmc/regions.rb +1 -1
  52. data/lib/oraclebmc/version.rb +1 -1
  53. metadata +32 -2
@@ -19,15 +19,15 @@ module OracleBMC
19
19
 
20
20
  # - **VcnLocal:** Reserved for future use.
21
21
  #
22
- # - **VcnLocalPlusInternet:** Also referred to as \"Internet and VCN Resolver\".
23
- # Instances can resolve internet hostnames (no Internet Gateway is required),
22
+ # - **VcnLocalPlusInternet:** Also referred to as \"Internet and VCN Resolver\".
23
+ # Instances can resolve internet hostnames (no Internet Gateway is required),
24
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
25
+ # value in the default set of DHCP options in the VCN. For the Internet and
26
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
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
31
  # [DNS in Your Virtual Cloud Network](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm).
32
32
  #
33
33
  # - **CustomDnsServer:** Instances use a DNS server of your choice (three maximum).
@@ -4,7 +4,7 @@ require 'date'
4
4
 
5
5
  module OracleBMC
6
6
  class Core::Models::DhcpOption
7
- # The specific DHCP option. Either `DomainNameServer`
7
+ # The specific DHCP option. Either `DomainNameServer`
8
8
  # (for {DhcpDnsOption}) or
9
9
  # `SearchDomain` (for {DhcpSearchDomainOption}).
10
10
  #
@@ -5,20 +5,19 @@ require_relative 'dhcp_option'
5
5
 
6
6
  module OracleBMC
7
7
  class Core::Models::DhcpSearchDomainOption < Core::Models::DhcpOption
8
- # A single search domain name according to [RFC 952](https://tools.ietf.org/html/rfc952)
8
+ # A single search domain name according to [RFC 952](https://tools.ietf.org/html/rfc952)
9
9
  # and [RFC 1123](https://tools.ietf.org/html/rfc1123). During a DNS query,
10
- # the OS will append this search domain name to the value being queried, but only if
11
- # that value is not a fully qualified domain name (FQDN).
10
+ # the OS will append this search domain name to the value being queried.
12
11
  #
13
- # If you set {DhcpDnsOption} to `VcnLocalPlusInternet`,
14
- # and you assign a DNS label to the VCN during creation, the search domain name in the
15
- # VCN's default set of DHCP options is automatically set to the VCN domain
12
+ # If you set {DhcpDnsOption} to `VcnLocalPlusInternet`,
13
+ # and you assign a DNS label to the VCN during creation, the search domain name in the
14
+ # VCN's default set of DHCP options is automatically set to the VCN domain
16
15
  # (e.g., `vcn1.oraclevcn.com`).
17
16
  #
18
17
  # If you don't want to use a search domain name, omit this option from the
19
18
  # set of DHCP options. Do not include this option with an empty list
20
19
  # of search domain names, or with an empty string as the value for any search
21
- # domain name.
20
+ # domain name.
22
21
  #
23
22
  # @return [Array<String>]
24
23
  attr_accessor :search_domain_names
@@ -0,0 +1,146 @@
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::FastConnectProviderService
7
+ # A description of the service offered by the provider.
8
+ #
9
+ # @return [String]
10
+ attr_accessor :description
11
+
12
+ # The name of the provider.
13
+ #
14
+ # @return [String]
15
+ attr_accessor :provider_name
16
+
17
+ # The name of the service offered by the provider.
18
+ #
19
+ # @return [String]
20
+ attr_accessor :provider_service_name
21
+
22
+
23
+ # Initializes the object
24
+ # @param [Hash] attributes Model attributes in the form of hash
25
+ def initialize(attributes = {})
26
+ return unless attributes.is_a?(Hash)
27
+
28
+ # convert string to symbol for hash key
29
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
30
+
31
+
32
+ if attributes[:'description']
33
+ self.description = attributes[:'description']
34
+ end
35
+
36
+ if attributes[:'providerName']
37
+ self.provider_name = attributes[:'providerName']
38
+ end
39
+
40
+ if attributes[:'providerServiceName']
41
+ self.provider_service_name = attributes[:'providerServiceName']
42
+ end
43
+
44
+ end
45
+
46
+ # Checks equality by comparing each attribute.
47
+ # @param [Object] other_object to be compared
48
+ def ==(other_object)
49
+ return true if self.equal?(other_object)
50
+ self.class == other_object.class &&
51
+ description == other_object.description &&
52
+ provider_name == other_object.provider_name &&
53
+ provider_service_name == other_object.provider_service_name
54
+ end
55
+
56
+ # @see the `==` method
57
+ # @param [Object] other_object to be compared
58
+ def eql?(other_object)
59
+ self == other_object
60
+ end
61
+
62
+ # Calculates hash code according to all attributes.
63
+ # @return [Fixnum] Hash code
64
+ def hash
65
+ [description, provider_name, provider_service_name].hash
66
+ end
67
+
68
+ # Builds the object from hash
69
+ # @param [Hash] attributes Model attributes in the form of hash
70
+ # @return [Object] Returns the model itself
71
+ def build_from_hash(attributes)
72
+ return nil unless attributes.is_a?(Hash)
73
+ self.class.swagger_types.each_pair do |key, type|
74
+ if type =~ /^Array<(.*)>/i
75
+ # check to ensure the input is an array given that the the attribute
76
+ # is documented as an array but the input is not
77
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
78
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
79
+ end
80
+ elsif !attributes[self.class.attribute_map[key]].nil?
81
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
82
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
83
+ end
84
+
85
+ self
86
+ end
87
+
88
+ # Returns the string representation of the object
89
+ # @return [String] String presentation of the object
90
+ def to_s
91
+ to_hash.to_s
92
+ end
93
+
94
+ # Returns the object in the form of hash
95
+ # @return [Hash] Returns the object in the form of hash
96
+ def to_hash
97
+ hash = {}
98
+ self.class.attribute_map.each_pair do |attr, param|
99
+ value = self.send(attr)
100
+ next if value.nil?
101
+ hash[param] = _to_hash(value)
102
+ end
103
+ hash
104
+ end
105
+
106
+ private
107
+
108
+ # Outputs non-array value in the form of hash
109
+ # For object, use to_hash. Otherwise, just return the value
110
+ # @param [Object] value Any valid value
111
+ # @return [Hash] Returns the value in the form of hash
112
+ def _to_hash(value)
113
+ if value.is_a?(Array)
114
+ value.compact.map{ |v| _to_hash(v) }
115
+ elsif value.is_a?(Hash)
116
+ {}.tap do |hash|
117
+ value.each { |k, v| hash[k] = _to_hash(v) }
118
+ end
119
+ elsif value.respond_to? :to_hash
120
+ value.to_hash
121
+ else
122
+ value
123
+ end
124
+ end
125
+
126
+
127
+
128
+ # Attribute mapping from ruby-style variable name to JSON key.
129
+ def self.attribute_map
130
+ {
131
+ :'description' => :'description',
132
+ :'provider_name' => :'providerName',
133
+ :'provider_service_name' => :'providerServiceName'
134
+ }
135
+ end
136
+
137
+ # Attribute type mapping.
138
+ def self.swagger_types
139
+ {
140
+ :'description' => :'String',
141
+ :'provider_name' => :'String',
142
+ :'provider_service_name' => :'String'
143
+ }
144
+ end
145
+ end
146
+ end
@@ -20,7 +20,7 @@ module OracleBMC
20
20
  # @return [String]
21
21
  attr_accessor :compartment_id
22
22
 
23
- # Whether instances launched with this image can be used to create new images.
23
+ # Whether instances launched with this image can be used to create new images.
24
24
  # For example, you cannot create an image of an Oracle Database instance.
25
25
  #
26
26
  # Example: `true`
@@ -53,18 +53,17 @@ module OracleBMC
53
53
  # every time an instance boots; not only after the initial
54
54
  # LaunchInstance call.
55
55
  #
56
- # The default iPXE script connects to the instance\u2019s local boot
56
+ # The default iPXE script connects to the instance's local boot
57
57
  # volume over iSCSI and performs a network boot. If you use a custom iPXE
58
- # script and want to network-boot from the instance\u2019s local boot volume
58
+ # script and want to network-boot from the instance's local boot volume
59
59
  # over iSCSI the same way as the default iPXE script, you should use the
60
60
  # following iSCSI IP address: 169.254.0.2, and boot volume IQN:
61
61
  # iqn.2015-02.oracle.boot.
62
62
  #
63
- # For more information about the Bring Your Own Image feature of
64
- # Oracle Bare Metal Cloud Services, see [Bring Your Own Custom
65
- # Image: RHEL 7.x & Derivatives (CentOS, Oracle Linux)]
66
- # (/Content/General/Reference/aqswhitepapers.htm).
67
- #
63
+ # For more information about the Bring Your Own Image feature of
64
+ # Oracle Bare Metal Cloud Services, see
65
+ # [Bring Your Own Image](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/bringyourownimage.htm).
66
+ #
68
67
  # For more information about iPXE, see http://ipxe.org.
69
68
  #
70
69
  # @return [String]
@@ -15,6 +15,10 @@ module OracleBMC
15
15
  # @return [String]
16
16
  attr_accessor :compartment_id
17
17
 
18
+ # Details for the VNIC that is automatically created when an instance is launched.
19
+ # @return [OracleBMC::Core::Models::CreateVnicDetails]
20
+ attr_accessor :create_vnic_details
21
+
18
22
  # A user-friendly name. Does not have to be unique, and it's changeable.
19
23
  #
20
24
  # Example: `My bare metal instance`
@@ -22,20 +26,9 @@ module OracleBMC
22
26
  # @return [String]
23
27
  attr_accessor :display_name
24
28
 
25
- # The hostname for the VNIC that is created during instance launch.
26
- # Used for DNS. The value is the hostname portion of the instance's
27
- # fully qualified domain name (FQDN) (e.g., `bminstance-1` in FQDN
28
- # `bminstance-1.subnet123.vcn1.oraclevcn.com`).
29
- # Must be unique across all VNICs in the subnet and comply with
30
- # [RFC 952](https://tools.ietf.org/html/rfc952) and
31
- # [RFC 1123](https://tools.ietf.org/html/rfc1123).
32
- # The value cannot be changed, and it can be retrieved from the
33
- # {Vnic}.
34
- #
35
- # For more information, see
36
- # [DNS in Your Virtual Cloud Network](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/dns.htm).
37
- #
38
- # Example: `bminstance-1`
29
+ # Deprecated. Instead use `hostnameLabel` in
30
+ # {CreateVnicDetails}.
31
+ # If you provide both, the values must match.
39
32
  #
40
33
  # @return [String]
41
34
  attr_accessor :hostname_label
@@ -56,14 +49,14 @@ module OracleBMC
56
49
  # every time an instance boots; not only after the initial
57
50
  # LaunchInstance call.
58
51
  #
59
- # The default iPXE script connects to the instance\u2019s local boot
52
+ # The default iPXE script connects to the instance's local boot
60
53
  # volume over iSCSI and performs a network boot. If you use a custom iPXE
61
- # script and want to network-boot from the instance\u2019s local boot volume
54
+ # script and want to network-boot from the instance's local boot volume
62
55
  # over iSCSI the same way as the default iPXE script, you should use the
63
56
  # following iSCSI IP address: 169.254.0.2, and boot volume IQN:
64
57
  # iqn.2015-02.oracle.boot.
65
58
  #
66
- # For more information about the Bring Your Own Image feature of
59
+ # For more information about the Bring Your Own Image feature of
67
60
  # Oracle Bare Metal Cloud Services, see
68
61
  # [Bring Your Own Image](https://docs.us-phoenix-1.oraclecloud.com/Content/Compute/References/bringyourownimage.htm).
69
62
  #
@@ -142,7 +135,10 @@ module OracleBMC
142
135
  # @return [String]
143
136
  attr_accessor :shape
144
137
 
145
- # The OCID of the subnet.
138
+ # Deprecated. Instead use `subnetId` in
139
+ # {CreateVnicDetails}.
140
+ # At least one of them is required; if you provide both, the values must match.
141
+ #
146
142
  # @return [String]
147
143
  attr_accessor :subnet_id
148
144
 
@@ -164,6 +160,10 @@ module OracleBMC
164
160
  self.compartment_id = attributes[:'compartmentId']
165
161
  end
166
162
 
163
+ if attributes[:'createVnicDetails']
164
+ self.create_vnic_details = attributes[:'createVnicDetails']
165
+ end
166
+
167
167
  if attributes[:'displayName']
168
168
  self.display_name = attributes[:'displayName']
169
169
  end
@@ -201,6 +201,7 @@ module OracleBMC
201
201
  self.class == other_object.class &&
202
202
  availability_domain == other_object.availability_domain &&
203
203
  compartment_id == other_object.compartment_id &&
204
+ create_vnic_details == other_object.create_vnic_details &&
204
205
  display_name == other_object.display_name &&
205
206
  hostname_label == other_object.hostname_label &&
206
207
  image_id == other_object.image_id &&
@@ -219,7 +220,7 @@ module OracleBMC
219
220
  # Calculates hash code according to all attributes.
220
221
  # @return [Fixnum] Hash code
221
222
  def hash
222
- [availability_domain, compartment_id, display_name, hostname_label, image_id, ipxe_script, metadata, shape, subnet_id].hash
223
+ [availability_domain, compartment_id, create_vnic_details, display_name, hostname_label, image_id, ipxe_script, metadata, shape, subnet_id].hash
223
224
  end
224
225
 
225
226
  # Builds the object from hash
@@ -287,6 +288,7 @@ module OracleBMC
287
288
  {
288
289
  :'availability_domain' => :'availabilityDomain',
289
290
  :'compartment_id' => :'compartmentId',
291
+ :'create_vnic_details' => :'createVnicDetails',
290
292
  :'display_name' => :'displayName',
291
293
  :'hostname_label' => :'hostnameLabel',
292
294
  :'image_id' => :'imageId',
@@ -302,6 +304,7 @@ module OracleBMC
302
304
  {
303
305
  :'availability_domain' => :'String',
304
306
  :'compartment_id' => :'String',
307
+ :'create_vnic_details' => :'OracleBMC::Core::Models::CreateVnicDetails',
305
308
  :'display_name' => :'String',
306
309
  :'hostname_label' => :'String',
307
310
  :'image_id' => :'String',
@@ -0,0 +1,195 @@
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::LetterOfAuthority
7
+
8
+ CIRCUIT_TYPE_ENUM = [CIRCUIT_TYPE_SINGLE_MODE_LC = 'Single_mode_LC',
9
+ CIRCUIT_TYPE_SINGLE_MODE_SC = 'Single_mode_SC',
10
+ CIRCUIT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
11
+
12
+ # The type of cross-connect fiber, termination, and optical specification.
13
+ # @return [String]
14
+ attr_accessor :circuit_type
15
+
16
+ # The OCID of the cross-connect.
17
+ # @return [String]
18
+ attr_accessor :cross_connect_id
19
+
20
+ # The address of the FastConnect location.
21
+ # @return [String]
22
+ attr_accessor :facility_location
23
+
24
+ # The meet-me room port for this cross-connect.
25
+ # @return [String]
26
+ attr_accessor :port_name
27
+
28
+ # The date and time when the Letter of Authority expires, in the format defined by RFC3339.
29
+ #
30
+ # @return [DateTime]
31
+ attr_accessor :time_expires
32
+
33
+ # The date and time the Letter of Authority was created, in the format defined by RFC3339.
34
+ #
35
+ # Example: `2016-08-25T21:10:29.600Z`
36
+ #
37
+ # @return [DateTime]
38
+ attr_accessor :time_issued
39
+
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
48
+
49
+
50
+ if attributes[:'circuitType']
51
+ self.circuit_type = attributes[:'circuitType']
52
+ end
53
+
54
+ if attributes[:'crossConnectId']
55
+ self.cross_connect_id = attributes[:'crossConnectId']
56
+ end
57
+
58
+ if attributes[:'facilityLocation']
59
+ self.facility_location = attributes[:'facilityLocation']
60
+ end
61
+
62
+ if attributes[:'portName']
63
+ self.port_name = attributes[:'portName']
64
+ end
65
+
66
+ if attributes[:'timeExpires']
67
+ self.time_expires = attributes[:'timeExpires']
68
+ end
69
+
70
+ if attributes[:'timeIssued']
71
+ self.time_issued = attributes[:'timeIssued']
72
+ end
73
+
74
+ end
75
+
76
+ # Custom attribute writer method checking allowed values (enum).
77
+ # @param [Object] circuit_type Object to be assigned
78
+ def circuit_type=(circuit_type)
79
+ if circuit_type && !CIRCUIT_TYPE_ENUM.include?(circuit_type)
80
+ @circuit_type = CIRCUIT_TYPE_UNKNOWN_ENUM_VALUE
81
+ else
82
+ @circuit_type = circuit_type
83
+ end
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] other_object to be compared
88
+ def ==(other_object)
89
+ return true if self.equal?(other_object)
90
+ self.class == other_object.class &&
91
+ circuit_type == other_object.circuit_type &&
92
+ cross_connect_id == other_object.cross_connect_id &&
93
+ facility_location == other_object.facility_location &&
94
+ port_name == other_object.port_name &&
95
+ time_expires == other_object.time_expires &&
96
+ time_issued == other_object.time_issued
97
+ end
98
+
99
+ # @see the `==` method
100
+ # @param [Object] other_object to be compared
101
+ def eql?(other_object)
102
+ self == other_object
103
+ end
104
+
105
+ # Calculates hash code according to all attributes.
106
+ # @return [Fixnum] Hash code
107
+ def hash
108
+ [circuit_type, cross_connect_id, facility_location, port_name, time_expires, time_issued].hash
109
+ end
110
+
111
+ # Builds the object from hash
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ # @return [Object] Returns the model itself
114
+ def build_from_hash(attributes)
115
+ return nil unless attributes.is_a?(Hash)
116
+ self.class.swagger_types.each_pair do |key, type|
117
+ if type =~ /^Array<(.*)>/i
118
+ # check to ensure the input is an array given that the the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
121
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
122
+ end
123
+ elsif !attributes[self.class.attribute_map[key]].nil?
124
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
125
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
126
+ end
127
+
128
+ self
129
+ end
130
+
131
+ # Returns the string representation of the object
132
+ # @return [String] String presentation of the object
133
+ def to_s
134
+ to_hash.to_s
135
+ end
136
+
137
+ # Returns the object in the form of hash
138
+ # @return [Hash] Returns the object in the form of hash
139
+ def to_hash
140
+ hash = {}
141
+ self.class.attribute_map.each_pair do |attr, param|
142
+ value = self.send(attr)
143
+ next if value.nil?
144
+ hash[param] = _to_hash(value)
145
+ end
146
+ hash
147
+ end
148
+
149
+ private
150
+
151
+ # Outputs non-array value in the form of hash
152
+ # For object, use to_hash. Otherwise, just return the value
153
+ # @param [Object] value Any valid value
154
+ # @return [Hash] Returns the value in the form of hash
155
+ def _to_hash(value)
156
+ if value.is_a?(Array)
157
+ value.compact.map{ |v| _to_hash(v) }
158
+ elsif value.is_a?(Hash)
159
+ {}.tap do |hash|
160
+ value.each { |k, v| hash[k] = _to_hash(v) }
161
+ end
162
+ elsif value.respond_to? :to_hash
163
+ value.to_hash
164
+ else
165
+ value
166
+ end
167
+ end
168
+
169
+
170
+
171
+ # Attribute mapping from ruby-style variable name to JSON key.
172
+ def self.attribute_map
173
+ {
174
+ :'circuit_type' => :'circuitType',
175
+ :'cross_connect_id' => :'crossConnectId',
176
+ :'facility_location' => :'facilityLocation',
177
+ :'port_name' => :'portName',
178
+ :'time_expires' => :'timeExpires',
179
+ :'time_issued' => :'timeIssued'
180
+ }
181
+ end
182
+
183
+ # Attribute type mapping.
184
+ def self.swagger_types
185
+ {
186
+ :'circuit_type' => :'String',
187
+ :'cross_connect_id' => :'String',
188
+ :'facility_location' => :'String',
189
+ :'port_name' => :'String',
190
+ :'time_expires' => :'DateTime',
191
+ :'time_issued' => :'DateTime'
192
+ }
193
+ end
194
+ end
195
+ end