oci 2.5.2 → 2.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -7
- data/lib/oci/api_client.rb +1 -1
- data/lib/oci/container_engine/container_engine_client.rb +19 -8
- data/lib/oci/container_engine/models/cluster.rb +1 -1
- data/lib/oci/container_engine/models/create_node_pool_details.rb +15 -1
- data/lib/oci/container_engine/models/node_pool.rb +16 -2
- data/lib/oci/database/database.rb +2 -0
- data/lib/oci/database/database_client.rb +1 -1
- data/lib/oci/database/database_client_composite_operations.rb +1 -1
- data/lib/oci/database/models/autonomous_database.rb +15 -1
- data/lib/oci/database/models/autonomous_database_summary.rb +15 -1
- data/lib/oci/database/models/create_autonomous_database_base.rb +366 -0
- data/lib/oci/database/models/create_autonomous_database_clone_details.rb +231 -0
- data/lib/oci/database/models/create_autonomous_database_details.rb +21 -158
- data/lib/oci/resource_manager/resource_manager_client.rb +1 -1
- data/lib/oci/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e50aec53657bc50fd4f4a486a9c9271162ee5ca8359b122826daaf9ba84cebae
|
4
|
+
data.tar.gz: d55e454f869a09abb01e1b8999ed92c357af9af1c5f624f33526e292c2749a26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 521e46b9785d4abb0293bd312f7163a4f4277ef251b39c7ff44cf768bd242df89ad9d513ee693f1af0a8bcb7e454bce3f9004c82d19f914d0bcd739ffbdcdab7
|
7
|
+
data.tar.gz: 975fd8d0735c0a0e9fbf291ca3cdd8884879ae9e5125b69ede5bf8132cc3d8fec108f3bdc5ad21d6ac2307e811dc7933b8cacd0ccb5338dac0cf4373a4928527
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Oracle Cloud Infrastructure Ruby SDK
|
2
|
-
**Version 2.5.
|
2
|
+
**Version 2.5.3**
|
3
3
|
|
4
4
|
This topic describes how to install, configure, and use the Oracle Cloud Infrastructure Ruby SDK.
|
5
5
|
|
@@ -7,7 +7,7 @@ This topic describes how to install, configure, and use the Oracle Cloud Infrast
|
|
7
7
|
|
8
8
|
The Ruby SDK supports the following services:
|
9
9
|
|
10
|
-
* Announcements
|
10
|
+
* Announcements
|
11
11
|
* Audit
|
12
12
|
* Budgets
|
13
13
|
* Compute Autoscaling
|
@@ -17,7 +17,7 @@ The Ruby SDK supports the following services:
|
|
17
17
|
* Domain Name System
|
18
18
|
* Email
|
19
19
|
* File Storage
|
20
|
-
* Health Checks
|
20
|
+
* Health Checks
|
21
21
|
* Identity and Access Management
|
22
22
|
* Key Management
|
23
23
|
* Load Balancing
|
@@ -326,7 +326,7 @@ Once an {OCI::ApiClientProxySettings} object has been created, it can be used wh
|
|
326
326
|
## Exceptions
|
327
327
|
|
328
328
|
### Service Errors
|
329
|
-
Any operation that receives a response with a non-2xx HTTP status code from an Oracle Cloud Infrastructure service will cause an exception of type {OCI::Errors::ServiceError ServiceError} to be thrown by the SDK.
|
329
|
+
Any operation that receives a response with a non-2xx HTTP status code from an Oracle Cloud Infrastructure service will cause an exception of type {OCI::Errors::ServiceError ServiceError} to be thrown by the SDK.
|
330
330
|
|
331
331
|
For information about common service errors returned by OCI, see [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
|
332
332
|
|
@@ -342,7 +342,7 @@ You can also call {OCI::Errors::ServiceError#to_s to_s} on the error to get a su
|
|
342
342
|
#### HTTP 3xx Responses
|
343
343
|
The SDK will throw exceptions of type {OCI::Errors::ServiceError ServiceError} on HTTP 3xx responses. This impacts operations that support conditional GETs. This includes {OCI::ObjectStorage::ObjectStorageClient#get_object} and {OCI::ObjectStorage::ObjectStorageClient#head_object} methods as these can return responses with a HTTP status code of 304 if passed an `if_none_match`, which corresponds to the current etag of the object or bucket.
|
344
344
|
|
345
|
-
In order to account for this, you should catch {OCI::Errors::ServiceError ServiceError} and check its `status_code` attribute for the HTTP status code. For example:
|
345
|
+
In order to account for this, you should catch {OCI::Errors::ServiceError ServiceError} and check its `status_code` attribute for the HTTP status code. For example:
|
346
346
|
|
347
347
|
require 'oci'
|
348
348
|
|
@@ -373,9 +373,9 @@ The key attributes to inspect when dealing with a {OCI::Errors::NetworkError} ar
|
|
373
373
|
You can also call {OCI::Errors::NetworkError#to_s to_s} on the error to get a summary of the key information about the error. In addition, the {OCI::Errors::NetworkError#cause NetworkError.cause} of the {OCI::Errors::NetworkError NetworkError} can be inspected to see the original error that caused the {OCI::Errors::NetworkError NetworkError} to be thrown.
|
374
374
|
|
375
375
|
### Response Parsing Errors
|
376
|
-
{OCI::Errors::ResponseParsingError ResponseParsingError} is thrown when a response was received from an Oracle Cloud Infrastructure service but the SDK could not parse it into the appropriate model type to put into an {OCI::Response}.
|
376
|
+
{OCI::Errors::ResponseParsingError ResponseParsingError} is thrown when a response was received from an Oracle Cloud Infrastructure service but the SDK could not parse it into the appropriate model type to put into an {OCI::Response}.
|
377
377
|
|
378
|
-
The key attributes to inspect when dealing with a {OCI::Errors::ResponseParsingError} are:
|
378
|
+
The key attributes to inspect when dealing with a {OCI::Errors::ResponseParsingError} are:
|
379
379
|
|
380
380
|
* {OCI::Errors::ResponseParsingError#request_made request_made} and {OCI::Errors::ResponseParsingError#response_received response_received} contain the `Net::HTTPRequest` and `Net::HTTPResponse`, respectively
|
381
381
|
* {OCI::Errors::ResponseParsingError#response_body response_body} contains the response data which failed to parse
|
data/lib/oci/api_client.rb
CHANGED
@@ -420,7 +420,7 @@ module OCI
|
|
420
420
|
raise 'Response cannot be nil' if response.nil?
|
421
421
|
raise 'A non-blank prefix must be provided' if prefix.nil? || prefix.strip.empty?
|
422
422
|
|
423
|
-
prefix_size = prefix.length
|
423
|
+
prefix_size = prefix.length
|
424
424
|
processed_keys = {}
|
425
425
|
|
426
426
|
response.each_header do |key, value|
|
@@ -5,7 +5,9 @@ require 'logger'
|
|
5
5
|
|
6
6
|
# rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
7
7
|
module OCI
|
8
|
-
# Container Engine for Kubernetes API
|
8
|
+
# API for the Container Engine for Kubernetes service. Use this API to build, deploy,
|
9
|
+
# and manage cloud-native applications. For more information, see
|
10
|
+
# [Overview of Container Engine for Kubernetes](/iaas/Content/ContEng/Concepts/contengoverview.htm).
|
9
11
|
class ContainerEngine::ContainerEngineClient
|
10
12
|
# Client used to make HTTP requests.
|
11
13
|
# @return [OCI::ApiClient]
|
@@ -94,7 +96,7 @@ module OCI
|
|
94
96
|
|
95
97
|
raise 'A region must be specified.' unless @region
|
96
98
|
|
97
|
-
@endpoint = OCI::Regions.
|
99
|
+
@endpoint = OCI::Regions.get_service_endpoint_for_template(@region, 'https://containerengine.{region}.{secondLevelDomain}') + '/20180222'
|
98
100
|
logger.info "ContainerEngineClient endpoint set to '#{@endpoint} from region #{@region}'." if logger
|
99
101
|
end
|
100
102
|
|
@@ -786,9 +788,12 @@ module OCI
|
|
786
788
|
# @option opts [Array<String>] :lifecycle_state A cluster lifecycle state to filter on. Can have multiple parameters of this name.
|
787
789
|
# Allowed values are: CREATING, ACTIVE, FAILED, DELETING, DELETED, UPDATING
|
788
790
|
# @option opts [String] :name The name to filter on.
|
789
|
-
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
791
|
+
# @option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call.
|
792
|
+
# 1 is the minimum, 1000 is the maximum. For important details about how pagination works,
|
793
|
+
# see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
|
790
794
|
#
|
791
|
-
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
795
|
+
# @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call.
|
796
|
+
# For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
|
792
797
|
#
|
793
798
|
# @option opts [String] :sort_order The optional order in which to sort the results.
|
794
799
|
# @option opts [String] :sort_by The optional field to sort the results by.
|
@@ -874,9 +879,12 @@ module OCI
|
|
874
879
|
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
875
880
|
# @option opts [String] :cluster_id The OCID of the cluster.
|
876
881
|
# @option opts [String] :name The name to filter on.
|
877
|
-
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
882
|
+
# @option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call.
|
883
|
+
# 1 is the minimum, 1000 is the maximum. For important details about how pagination works,
|
884
|
+
# see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
|
878
885
|
#
|
879
|
-
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
886
|
+
# @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call.
|
887
|
+
# For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
|
880
888
|
#
|
881
889
|
# @option opts [String] :sort_order The optional order in which to sort the results.
|
882
890
|
# @option opts [String] :sort_by The optional field to sort the results by.
|
@@ -1072,9 +1080,12 @@ module OCI
|
|
1072
1080
|
# Allowed values are: CLUSTER, NODEPOOL
|
1073
1081
|
# @option opts [Array<String>] :status A work request status to filter on. Can have multiple parameters of this name.
|
1074
1082
|
# Allowed values are: ACCEPTED, IN_PROGRESS, FAILED, SUCCEEDED, CANCELING, CANCELED
|
1075
|
-
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
|
1083
|
+
# @option opts [Integer] :limit For list pagination. The maximum number of results per page, or items to return in a paginated \"List\" call.
|
1084
|
+
# 1 is the minimum, 1000 is the maximum. For important details about how pagination works,
|
1085
|
+
# see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
|
1076
1086
|
#
|
1077
|
-
# @option opts [String] :page The value of the `opc-next-page` response header from the previous \"List\" call.
|
1087
|
+
# @option opts [String] :page For list pagination. The value of the `opc-next-page` response header from the previous \"List\" call.
|
1088
|
+
# For important details about how pagination works, see [List Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).
|
1078
1089
|
#
|
1079
1090
|
# @option opts [String] :sort_order The optional order in which to sort the results.
|
1080
1091
|
# @option opts [String] :sort_by The optional field to sort the results by.
|
@@ -5,7 +5,7 @@ require 'logger'
|
|
5
5
|
|
6
6
|
# rubocop:disable Lint/UnneededCopDisableDirective
|
7
7
|
module OCI
|
8
|
-
# A Kubernetes cluster.
|
8
|
+
# A Kubernetes cluster. Avoid entering confidential information.
|
9
9
|
class ContainerEngine::Models::Cluster # rubocop:disable Metrics/LineLength
|
10
10
|
LIFECYCLE_STATE_ENUM = [
|
11
11
|
LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
|
@@ -22,6 +22,10 @@ module OCI
|
|
22
22
|
# @return [String]
|
23
23
|
attr_accessor :kubernetes_version
|
24
24
|
|
25
|
+
# A list of key/value pairs to add to each underlying OCI instance in the node pool.
|
26
|
+
# @return [Hash<String, String>]
|
27
|
+
attr_accessor :node_metadata
|
28
|
+
|
25
29
|
# **[Required]** The name of the image running on the nodes in the node pool.
|
26
30
|
# @return [String]
|
27
31
|
attr_accessor :node_image_name
|
@@ -54,6 +58,7 @@ module OCI
|
|
54
58
|
'cluster_id': :'clusterId',
|
55
59
|
'name': :'name',
|
56
60
|
'kubernetes_version': :'kubernetesVersion',
|
61
|
+
'node_metadata': :'nodeMetadata',
|
57
62
|
'node_image_name': :'nodeImageName',
|
58
63
|
'node_shape': :'nodeShape',
|
59
64
|
'initial_node_labels': :'initialNodeLabels',
|
@@ -72,6 +77,7 @@ module OCI
|
|
72
77
|
'cluster_id': :'String',
|
73
78
|
'name': :'String',
|
74
79
|
'kubernetes_version': :'String',
|
80
|
+
'node_metadata': :'Hash<String, String>',
|
75
81
|
'node_image_name': :'String',
|
76
82
|
'node_shape': :'String',
|
77
83
|
'initial_node_labels': :'Array<OCI::ContainerEngine::Models::KeyValue>',
|
@@ -92,6 +98,7 @@ module OCI
|
|
92
98
|
# @option attributes [String] :cluster_id The value to assign to the {#cluster_id} property
|
93
99
|
# @option attributes [String] :name The value to assign to the {#name} property
|
94
100
|
# @option attributes [String] :kubernetes_version The value to assign to the {#kubernetes_version} property
|
101
|
+
# @option attributes [Hash<String, String>] :node_metadata The value to assign to the {#node_metadata} property
|
95
102
|
# @option attributes [String] :node_image_name The value to assign to the {#node_image_name} property
|
96
103
|
# @option attributes [String] :node_shape The value to assign to the {#node_shape} property
|
97
104
|
# @option attributes [Array<OCI::ContainerEngine::Models::KeyValue>] :initial_node_labels The value to assign to the {#initial_node_labels} property
|
@@ -124,6 +131,12 @@ module OCI
|
|
124
131
|
|
125
132
|
self.kubernetes_version = attributes[:'kubernetes_version'] if attributes[:'kubernetes_version']
|
126
133
|
|
134
|
+
self.node_metadata = attributes[:'nodeMetadata'] if attributes[:'nodeMetadata']
|
135
|
+
|
136
|
+
raise 'You cannot provide both :nodeMetadata and :node_metadata' if attributes.key?(:'nodeMetadata') && attributes.key?(:'node_metadata')
|
137
|
+
|
138
|
+
self.node_metadata = attributes[:'node_metadata'] if attributes[:'node_metadata']
|
139
|
+
|
127
140
|
self.node_image_name = attributes[:'nodeImageName'] if attributes[:'nodeImageName']
|
128
141
|
|
129
142
|
raise 'You cannot provide both :nodeImageName and :node_image_name' if attributes.key?(:'nodeImageName') && attributes.key?(:'node_image_name')
|
@@ -176,6 +189,7 @@ module OCI
|
|
176
189
|
cluster_id == other.cluster_id &&
|
177
190
|
name == other.name &&
|
178
191
|
kubernetes_version == other.kubernetes_version &&
|
192
|
+
node_metadata == other.node_metadata &&
|
179
193
|
node_image_name == other.node_image_name &&
|
180
194
|
node_shape == other.node_shape &&
|
181
195
|
initial_node_labels == other.initial_node_labels &&
|
@@ -197,7 +211,7 @@ module OCI
|
|
197
211
|
# Calculates hash code according to all attributes.
|
198
212
|
# @return [Fixnum] Hash code
|
199
213
|
def hash
|
200
|
-
[compartment_id, cluster_id, name, kubernetes_version, node_image_name, node_shape, initial_node_labels, ssh_public_key, quantity_per_subnet, subnet_ids].hash
|
214
|
+
[compartment_id, cluster_id, name, kubernetes_version, node_metadata, node_image_name, node_shape, initial_node_labels, ssh_public_key, quantity_per_subnet, subnet_ids].hash
|
201
215
|
end
|
202
216
|
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
203
217
|
|
@@ -4,7 +4,7 @@ require 'date'
|
|
4
4
|
|
5
5
|
# rubocop:disable Lint/UnneededCopDisableDirective
|
6
6
|
module OCI
|
7
|
-
# A pool of compute nodes attached to a cluster.
|
7
|
+
# A pool of compute nodes attached to a cluster. Avoid entering confidential information.
|
8
8
|
class ContainerEngine::Models::NodePool # rubocop:disable Metrics/LineLength
|
9
9
|
# The OCID of the node pool.
|
10
10
|
# @return [String]
|
@@ -26,6 +26,10 @@ module OCI
|
|
26
26
|
# @return [String]
|
27
27
|
attr_accessor :kubernetes_version
|
28
28
|
|
29
|
+
# A list of key/value pairs to add to each underlying OCI instance in the node pool.
|
30
|
+
# @return [Hash<String, String>]
|
31
|
+
attr_accessor :node_metadata
|
32
|
+
|
29
33
|
# The OCID of the image running on the nodes in the node pool.
|
30
34
|
# @return [String]
|
31
35
|
attr_accessor :node_image_id
|
@@ -67,6 +71,7 @@ module OCI
|
|
67
71
|
'cluster_id': :'clusterId',
|
68
72
|
'name': :'name',
|
69
73
|
'kubernetes_version': :'kubernetesVersion',
|
74
|
+
'node_metadata': :'nodeMetadata',
|
70
75
|
'node_image_id': :'nodeImageId',
|
71
76
|
'node_image_name': :'nodeImageName',
|
72
77
|
'node_shape': :'nodeShape',
|
@@ -88,6 +93,7 @@ module OCI
|
|
88
93
|
'cluster_id': :'String',
|
89
94
|
'name': :'String',
|
90
95
|
'kubernetes_version': :'String',
|
96
|
+
'node_metadata': :'Hash<String, String>',
|
91
97
|
'node_image_id': :'String',
|
92
98
|
'node_image_name': :'String',
|
93
99
|
'node_shape': :'String',
|
@@ -111,6 +117,7 @@ module OCI
|
|
111
117
|
# @option attributes [String] :cluster_id The value to assign to the {#cluster_id} property
|
112
118
|
# @option attributes [String] :name The value to assign to the {#name} property
|
113
119
|
# @option attributes [String] :kubernetes_version The value to assign to the {#kubernetes_version} property
|
120
|
+
# @option attributes [Hash<String, String>] :node_metadata The value to assign to the {#node_metadata} property
|
114
121
|
# @option attributes [String] :node_image_id The value to assign to the {#node_image_id} property
|
115
122
|
# @option attributes [String] :node_image_name The value to assign to the {#node_image_name} property
|
116
123
|
# @option attributes [String] :node_shape The value to assign to the {#node_shape} property
|
@@ -147,6 +154,12 @@ module OCI
|
|
147
154
|
|
148
155
|
self.kubernetes_version = attributes[:'kubernetes_version'] if attributes[:'kubernetes_version']
|
149
156
|
|
157
|
+
self.node_metadata = attributes[:'nodeMetadata'] if attributes[:'nodeMetadata']
|
158
|
+
|
159
|
+
raise 'You cannot provide both :nodeMetadata and :node_metadata' if attributes.key?(:'nodeMetadata') && attributes.key?(:'node_metadata')
|
160
|
+
|
161
|
+
self.node_metadata = attributes[:'node_metadata'] if attributes[:'node_metadata']
|
162
|
+
|
150
163
|
self.node_image_id = attributes[:'nodeImageId'] if attributes[:'nodeImageId']
|
151
164
|
|
152
165
|
raise 'You cannot provide both :nodeImageId and :node_image_id' if attributes.key?(:'nodeImageId') && attributes.key?(:'node_image_id')
|
@@ -208,6 +221,7 @@ module OCI
|
|
208
221
|
cluster_id == other.cluster_id &&
|
209
222
|
name == other.name &&
|
210
223
|
kubernetes_version == other.kubernetes_version &&
|
224
|
+
node_metadata == other.node_metadata &&
|
211
225
|
node_image_id == other.node_image_id &&
|
212
226
|
node_image_name == other.node_image_name &&
|
213
227
|
node_shape == other.node_shape &&
|
@@ -231,7 +245,7 @@ module OCI
|
|
231
245
|
# Calculates hash code according to all attributes.
|
232
246
|
# @return [Fixnum] Hash code
|
233
247
|
def hash
|
234
|
-
[id, compartment_id, cluster_id, name, kubernetes_version, node_image_id, node_image_name, node_shape, initial_node_labels, ssh_public_key, quantity_per_subnet, subnet_ids, nodes].hash
|
248
|
+
[id, compartment_id, cluster_id, name, kubernetes_version, node_metadata, node_image_id, node_image_name, node_shape, initial_node_labels, ssh_public_key, quantity_per_subnet, subnet_ids, nodes].hash
|
235
249
|
end
|
236
250
|
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
237
251
|
|
@@ -26,6 +26,8 @@ require 'oci/database/models/complete_external_backup_job_details'
|
|
26
26
|
require 'oci/database/models/create_autonomous_data_warehouse_backup_details'
|
27
27
|
require 'oci/database/models/create_autonomous_data_warehouse_details'
|
28
28
|
require 'oci/database/models/create_autonomous_database_backup_details'
|
29
|
+
require 'oci/database/models/create_autonomous_database_base'
|
30
|
+
require 'oci/database/models/create_autonomous_database_clone_details'
|
29
31
|
require 'oci/database/models/create_autonomous_database_details'
|
30
32
|
require 'oci/database/models/create_backup_details'
|
31
33
|
require 'oci/database/models/create_data_guard_association_details'
|
@@ -297,7 +297,7 @@ module OCI
|
|
297
297
|
|
298
298
|
# Creates a new Autonomous Database.
|
299
299
|
#
|
300
|
-
# @param [OCI::Database::Models::
|
300
|
+
# @param [OCI::Database::Models::CreateAutonomousDatabaseBase] create_autonomous_database_details Request to create a new Autonomous Database.
|
301
301
|
# @param [Hash] opts the optional parameters
|
302
302
|
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
303
303
|
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
@@ -105,7 +105,7 @@ module OCI
|
|
105
105
|
# Calls {OCI::Database::DatabaseClient#create_autonomous_database} and then waits for the {OCI::Database::Models::AutonomousDatabase} acted upon
|
106
106
|
# to enter the given state(s).
|
107
107
|
#
|
108
|
-
# @param [OCI::Database::Models::
|
108
|
+
# @param [OCI::Database::Models::CreateAutonomousDatabaseBase] create_autonomous_database_details Request to create a new Autonomous Database.
|
109
109
|
# @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Database::Models::AutonomousDatabase#lifecycle_state}
|
110
110
|
# @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Database::DatabaseClient#create_autonomous_database}
|
111
111
|
# @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:
|
@@ -86,6 +86,10 @@ module OCI
|
|
86
86
|
# @return [String]
|
87
87
|
attr_reader :license_model
|
88
88
|
|
89
|
+
# The amount of storage that has been used, in terabytes.
|
90
|
+
# @return [Integer]
|
91
|
+
attr_accessor :used_data_storage_size_in_tbs
|
92
|
+
|
89
93
|
# Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
|
90
94
|
# For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
|
91
95
|
#
|
@@ -126,6 +130,7 @@ module OCI
|
|
126
130
|
'service_console_url': :'serviceConsoleUrl',
|
127
131
|
'connection_strings': :'connectionStrings',
|
128
132
|
'license_model': :'licenseModel',
|
133
|
+
'used_data_storage_size_in_tbs': :'usedDataStorageSizeInTBs',
|
129
134
|
'freeform_tags': :'freeformTags',
|
130
135
|
'defined_tags': :'definedTags',
|
131
136
|
'db_version': :'dbVersion',
|
@@ -150,6 +155,7 @@ module OCI
|
|
150
155
|
'service_console_url': :'String',
|
151
156
|
'connection_strings': :'OCI::Database::Models::AutonomousDatabaseConnectionStrings',
|
152
157
|
'license_model': :'String',
|
158
|
+
'used_data_storage_size_in_tbs': :'Integer',
|
153
159
|
'freeform_tags': :'Hash<String, String>',
|
154
160
|
'defined_tags': :'Hash<String, Hash<String, Object>>',
|
155
161
|
'db_version': :'String',
|
@@ -176,6 +182,7 @@ module OCI
|
|
176
182
|
# @option attributes [String] :service_console_url The value to assign to the {#service_console_url} property
|
177
183
|
# @option attributes [OCI::Database::Models::AutonomousDatabaseConnectionStrings] :connection_strings The value to assign to the {#connection_strings} property
|
178
184
|
# @option attributes [String] :license_model The value to assign to the {#license_model} property
|
185
|
+
# @option attributes [Integer] :used_data_storage_size_in_tbs The value to assign to the {#used_data_storage_size_in_tbs} property
|
179
186
|
# @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
|
180
187
|
# @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
|
181
188
|
# @option attributes [String] :db_version The value to assign to the {#db_version} property
|
@@ -251,6 +258,12 @@ module OCI
|
|
251
258
|
|
252
259
|
self.license_model = attributes[:'license_model'] if attributes[:'license_model']
|
253
260
|
|
261
|
+
self.used_data_storage_size_in_tbs = attributes[:'usedDataStorageSizeInTBs'] if attributes[:'usedDataStorageSizeInTBs']
|
262
|
+
|
263
|
+
raise 'You cannot provide both :usedDataStorageSizeInTBs and :used_data_storage_size_in_tbs' if attributes.key?(:'usedDataStorageSizeInTBs') && attributes.key?(:'used_data_storage_size_in_tbs')
|
264
|
+
|
265
|
+
self.used_data_storage_size_in_tbs = attributes[:'used_data_storage_size_in_tbs'] if attributes[:'used_data_storage_size_in_tbs']
|
266
|
+
|
254
267
|
self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
|
255
268
|
|
256
269
|
raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
|
@@ -344,6 +357,7 @@ module OCI
|
|
344
357
|
service_console_url == other.service_console_url &&
|
345
358
|
connection_strings == other.connection_strings &&
|
346
359
|
license_model == other.license_model &&
|
360
|
+
used_data_storage_size_in_tbs == other.used_data_storage_size_in_tbs &&
|
347
361
|
freeform_tags == other.freeform_tags &&
|
348
362
|
defined_tags == other.defined_tags &&
|
349
363
|
db_version == other.db_version &&
|
@@ -363,7 +377,7 @@ module OCI
|
|
363
377
|
# Calculates hash code according to all attributes.
|
364
378
|
# @return [Fixnum] Hash code
|
365
379
|
def hash
|
366
|
-
[id, compartment_id, lifecycle_state, lifecycle_details, db_name, cpu_core_count, data_storage_size_in_tbs, time_created, display_name, service_console_url, connection_strings, license_model, freeform_tags, defined_tags, db_version, db_workload].hash
|
380
|
+
[id, compartment_id, lifecycle_state, lifecycle_details, db_name, cpu_core_count, data_storage_size_in_tbs, time_created, display_name, service_console_url, connection_strings, license_model, used_data_storage_size_in_tbs, freeform_tags, defined_tags, db_version, db_workload].hash
|
367
381
|
end
|
368
382
|
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
369
383
|
|
@@ -88,6 +88,10 @@ module OCI
|
|
88
88
|
# @return [String]
|
89
89
|
attr_reader :license_model
|
90
90
|
|
91
|
+
# The amount of storage that has been used, in terabytes.
|
92
|
+
# @return [Integer]
|
93
|
+
attr_accessor :used_data_storage_size_in_tbs
|
94
|
+
|
91
95
|
# Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
|
92
96
|
# For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
|
93
97
|
#
|
@@ -128,6 +132,7 @@ module OCI
|
|
128
132
|
'service_console_url': :'serviceConsoleUrl',
|
129
133
|
'connection_strings': :'connectionStrings',
|
130
134
|
'license_model': :'licenseModel',
|
135
|
+
'used_data_storage_size_in_tbs': :'usedDataStorageSizeInTBs',
|
131
136
|
'freeform_tags': :'freeformTags',
|
132
137
|
'defined_tags': :'definedTags',
|
133
138
|
'db_version': :'dbVersion',
|
@@ -152,6 +157,7 @@ module OCI
|
|
152
157
|
'service_console_url': :'String',
|
153
158
|
'connection_strings': :'OCI::Database::Models::AutonomousDatabaseConnectionStrings',
|
154
159
|
'license_model': :'String',
|
160
|
+
'used_data_storage_size_in_tbs': :'Integer',
|
155
161
|
'freeform_tags': :'Hash<String, String>',
|
156
162
|
'defined_tags': :'Hash<String, Hash<String, Object>>',
|
157
163
|
'db_version': :'String',
|
@@ -178,6 +184,7 @@ module OCI
|
|
178
184
|
# @option attributes [String] :service_console_url The value to assign to the {#service_console_url} property
|
179
185
|
# @option attributes [OCI::Database::Models::AutonomousDatabaseConnectionStrings] :connection_strings The value to assign to the {#connection_strings} property
|
180
186
|
# @option attributes [String] :license_model The value to assign to the {#license_model} property
|
187
|
+
# @option attributes [Integer] :used_data_storage_size_in_tbs The value to assign to the {#used_data_storage_size_in_tbs} property
|
181
188
|
# @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
|
182
189
|
# @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
|
183
190
|
# @option attributes [String] :db_version The value to assign to the {#db_version} property
|
@@ -256,6 +263,12 @@ module OCI
|
|
256
263
|
|
257
264
|
self.license_model = attributes[:'license_model'] if attributes[:'license_model']
|
258
265
|
|
266
|
+
self.used_data_storage_size_in_tbs = attributes[:'usedDataStorageSizeInTBs'] if attributes[:'usedDataStorageSizeInTBs']
|
267
|
+
|
268
|
+
raise 'You cannot provide both :usedDataStorageSizeInTBs and :used_data_storage_size_in_tbs' if attributes.key?(:'usedDataStorageSizeInTBs') && attributes.key?(:'used_data_storage_size_in_tbs')
|
269
|
+
|
270
|
+
self.used_data_storage_size_in_tbs = attributes[:'used_data_storage_size_in_tbs'] if attributes[:'used_data_storage_size_in_tbs']
|
271
|
+
|
259
272
|
self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
|
260
273
|
|
261
274
|
raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
|
@@ -349,6 +362,7 @@ module OCI
|
|
349
362
|
service_console_url == other.service_console_url &&
|
350
363
|
connection_strings == other.connection_strings &&
|
351
364
|
license_model == other.license_model &&
|
365
|
+
used_data_storage_size_in_tbs == other.used_data_storage_size_in_tbs &&
|
352
366
|
freeform_tags == other.freeform_tags &&
|
353
367
|
defined_tags == other.defined_tags &&
|
354
368
|
db_version == other.db_version &&
|
@@ -368,7 +382,7 @@ module OCI
|
|
368
382
|
# Calculates hash code according to all attributes.
|
369
383
|
# @return [Fixnum] Hash code
|
370
384
|
def hash
|
371
|
-
[id, compartment_id, lifecycle_state, lifecycle_details, db_name, cpu_core_count, data_storage_size_in_tbs, time_created, display_name, service_console_url, connection_strings, license_model, freeform_tags, defined_tags, db_version, db_workload].hash
|
385
|
+
[id, compartment_id, lifecycle_state, lifecycle_details, db_name, cpu_core_count, data_storage_size_in_tbs, time_created, display_name, service_console_url, connection_strings, license_model, used_data_storage_size_in_tbs, freeform_tags, defined_tags, db_version, db_workload].hash
|
372
386
|
end
|
373
387
|
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
374
388
|
|
@@ -0,0 +1,366 @@
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
# rubocop:disable Lint/UnneededCopDisableDirective
|
6
|
+
module OCI
|
7
|
+
# Details to create an Oracle Autonomous Database.
|
8
|
+
#
|
9
|
+
# **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
|
10
|
+
#
|
11
|
+
# This class has direct subclasses. If you are using this class as input to a service operations then you should favor using a subclass over the base class
|
12
|
+
class Database::Models::CreateAutonomousDatabaseBase # rubocop:disable Metrics/LineLength
|
13
|
+
DB_WORKLOAD_ENUM = [
|
14
|
+
DB_WORKLOAD_OLTP = 'OLTP'.freeze,
|
15
|
+
DB_WORKLOAD_DW = 'DW'.freeze
|
16
|
+
].freeze
|
17
|
+
|
18
|
+
LICENSE_MODEL_ENUM = [
|
19
|
+
LICENSE_MODEL_LICENSE_INCLUDED = 'LICENSE_INCLUDED'.freeze,
|
20
|
+
LICENSE_MODEL_BRING_YOUR_OWN_LICENSE = 'BRING_YOUR_OWN_LICENSE'.freeze
|
21
|
+
].freeze
|
22
|
+
|
23
|
+
SOURCE_ENUM = [
|
24
|
+
SOURCE_NONE = 'NONE'.freeze,
|
25
|
+
SOURCE_DATABASE = 'DATABASE'.freeze
|
26
|
+
].freeze
|
27
|
+
|
28
|
+
# **[Required]** The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment of the autonomous database.
|
29
|
+
# @return [String]
|
30
|
+
attr_accessor :compartment_id
|
31
|
+
|
32
|
+
# **[Required]** The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy.
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :db_name
|
35
|
+
|
36
|
+
# **[Required]** The number of CPU Cores to be made available to the database.
|
37
|
+
# @return [Integer]
|
38
|
+
attr_accessor :cpu_core_count
|
39
|
+
|
40
|
+
# The autonomous database workload type.
|
41
|
+
# @return [String]
|
42
|
+
attr_reader :db_workload
|
43
|
+
|
44
|
+
# **[Required]** The size, in terabytes, of the data volume that will be created and attached to the database. This storage can later be scaled up if needed.
|
45
|
+
#
|
46
|
+
# @return [Integer]
|
47
|
+
attr_accessor :data_storage_size_in_tbs
|
48
|
+
|
49
|
+
# **[Required]** The password must be between 12 and 30 characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (\") or the username \"admin\", regardless of casing.
|
50
|
+
# @return [String]
|
51
|
+
attr_accessor :admin_password
|
52
|
+
|
53
|
+
# The user-friendly name for the Autonomous Database. The name does not have to be unique.
|
54
|
+
# @return [String]
|
55
|
+
attr_accessor :display_name
|
56
|
+
|
57
|
+
# The Oracle license model that applies to the Oracle Autonomous Database. The default is BRING_YOUR_OWN_LICENSE.
|
58
|
+
#
|
59
|
+
# @return [String]
|
60
|
+
attr_reader :license_model
|
61
|
+
|
62
|
+
# Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
|
63
|
+
# For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
|
64
|
+
#
|
65
|
+
# Example: `{\"Department\": \"Finance\"}`
|
66
|
+
#
|
67
|
+
# @return [Hash<String, String>]
|
68
|
+
attr_accessor :freeform_tags
|
69
|
+
|
70
|
+
# Defined tags for this resource. Each key is predefined and scoped to a namespace.
|
71
|
+
# For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
|
72
|
+
#
|
73
|
+
# Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
|
74
|
+
#
|
75
|
+
# @return [Hash<String, Hash<String, Object>>]
|
76
|
+
attr_accessor :defined_tags
|
77
|
+
|
78
|
+
# The source of the database: Use NONE for creating a new Autonomous Database. Use DATABASE for creating a new Autonomous Database by cloning an existing Autonomous Database.
|
79
|
+
#
|
80
|
+
# @return [String]
|
81
|
+
attr_reader :source
|
82
|
+
|
83
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
84
|
+
def self.attribute_map
|
85
|
+
{
|
86
|
+
# rubocop:disable Style/SymbolLiteral
|
87
|
+
'compartment_id': :'compartmentId',
|
88
|
+
'db_name': :'dbName',
|
89
|
+
'cpu_core_count': :'cpuCoreCount',
|
90
|
+
'db_workload': :'dbWorkload',
|
91
|
+
'data_storage_size_in_tbs': :'dataStorageSizeInTBs',
|
92
|
+
'admin_password': :'adminPassword',
|
93
|
+
'display_name': :'displayName',
|
94
|
+
'license_model': :'licenseModel',
|
95
|
+
'freeform_tags': :'freeformTags',
|
96
|
+
'defined_tags': :'definedTags',
|
97
|
+
'source': :'source'
|
98
|
+
# rubocop:enable Style/SymbolLiteral
|
99
|
+
}
|
100
|
+
end
|
101
|
+
|
102
|
+
# Attribute type mapping.
|
103
|
+
def self.swagger_types
|
104
|
+
{
|
105
|
+
# rubocop:disable Style/SymbolLiteral
|
106
|
+
'compartment_id': :'String',
|
107
|
+
'db_name': :'String',
|
108
|
+
'cpu_core_count': :'Integer',
|
109
|
+
'db_workload': :'String',
|
110
|
+
'data_storage_size_in_tbs': :'Integer',
|
111
|
+
'admin_password': :'String',
|
112
|
+
'display_name': :'String',
|
113
|
+
'license_model': :'String',
|
114
|
+
'freeform_tags': :'Hash<String, String>',
|
115
|
+
'defined_tags': :'Hash<String, Hash<String, Object>>',
|
116
|
+
'source': :'String'
|
117
|
+
# rubocop:enable Style/SymbolLiteral
|
118
|
+
}
|
119
|
+
end
|
120
|
+
|
121
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Layout/EmptyLines
|
122
|
+
|
123
|
+
|
124
|
+
# Given the hash representation of a subtype of this class,
|
125
|
+
# use the info in the hash to return the class of the subtype.
|
126
|
+
def self.get_subtype(object_hash)
|
127
|
+
type = object_hash[:'source'] # rubocop:disable Style/SymbolLiteral
|
128
|
+
|
129
|
+
return 'OCI::Database::Models::CreateAutonomousDatabaseCloneDetails' if type == 'DATABASE'
|
130
|
+
return 'OCI::Database::Models::CreateAutonomousDatabaseDetails' if type == 'NONE'
|
131
|
+
|
132
|
+
# TODO: Log a warning when the subtype is not found.
|
133
|
+
'OCI::Database::Models::CreateAutonomousDatabaseBase'
|
134
|
+
end
|
135
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Layout/EmptyLines
|
136
|
+
|
137
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
138
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
139
|
+
|
140
|
+
|
141
|
+
# Initializes the object
|
142
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
143
|
+
# @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
|
144
|
+
# @option attributes [String] :db_name The value to assign to the {#db_name} property
|
145
|
+
# @option attributes [Integer] :cpu_core_count The value to assign to the {#cpu_core_count} property
|
146
|
+
# @option attributes [String] :db_workload The value to assign to the {#db_workload} property
|
147
|
+
# @option attributes [Integer] :data_storage_size_in_tbs The value to assign to the {#data_storage_size_in_tbs} property
|
148
|
+
# @option attributes [String] :admin_password The value to assign to the {#admin_password} property
|
149
|
+
# @option attributes [String] :display_name The value to assign to the {#display_name} property
|
150
|
+
# @option attributes [String] :license_model The value to assign to the {#license_model} property
|
151
|
+
# @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
|
152
|
+
# @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
|
153
|
+
# @option attributes [String] :source The value to assign to the {#source} property
|
154
|
+
def initialize(attributes = {})
|
155
|
+
return unless attributes.is_a?(Hash)
|
156
|
+
|
157
|
+
# convert string to symbol for hash key
|
158
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
159
|
+
|
160
|
+
self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
|
161
|
+
|
162
|
+
raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
|
163
|
+
|
164
|
+
self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
|
165
|
+
|
166
|
+
self.db_name = attributes[:'dbName'] if attributes[:'dbName']
|
167
|
+
|
168
|
+
raise 'You cannot provide both :dbName and :db_name' if attributes.key?(:'dbName') && attributes.key?(:'db_name')
|
169
|
+
|
170
|
+
self.db_name = attributes[:'db_name'] if attributes[:'db_name']
|
171
|
+
|
172
|
+
self.cpu_core_count = attributes[:'cpuCoreCount'] if attributes[:'cpuCoreCount']
|
173
|
+
|
174
|
+
raise 'You cannot provide both :cpuCoreCount and :cpu_core_count' if attributes.key?(:'cpuCoreCount') && attributes.key?(:'cpu_core_count')
|
175
|
+
|
176
|
+
self.cpu_core_count = attributes[:'cpu_core_count'] if attributes[:'cpu_core_count']
|
177
|
+
|
178
|
+
self.db_workload = attributes[:'dbWorkload'] if attributes[:'dbWorkload']
|
179
|
+
|
180
|
+
raise 'You cannot provide both :dbWorkload and :db_workload' if attributes.key?(:'dbWorkload') && attributes.key?(:'db_workload')
|
181
|
+
|
182
|
+
self.db_workload = attributes[:'db_workload'] if attributes[:'db_workload']
|
183
|
+
|
184
|
+
self.data_storage_size_in_tbs = attributes[:'dataStorageSizeInTBs'] if attributes[:'dataStorageSizeInTBs']
|
185
|
+
|
186
|
+
raise 'You cannot provide both :dataStorageSizeInTBs and :data_storage_size_in_tbs' if attributes.key?(:'dataStorageSizeInTBs') && attributes.key?(:'data_storage_size_in_tbs')
|
187
|
+
|
188
|
+
self.data_storage_size_in_tbs = attributes[:'data_storage_size_in_tbs'] if attributes[:'data_storage_size_in_tbs']
|
189
|
+
|
190
|
+
self.admin_password = attributes[:'adminPassword'] if attributes[:'adminPassword']
|
191
|
+
|
192
|
+
raise 'You cannot provide both :adminPassword and :admin_password' if attributes.key?(:'adminPassword') && attributes.key?(:'admin_password')
|
193
|
+
|
194
|
+
self.admin_password = attributes[:'admin_password'] if attributes[:'admin_password']
|
195
|
+
|
196
|
+
self.display_name = attributes[:'displayName'] if attributes[:'displayName']
|
197
|
+
|
198
|
+
raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
|
199
|
+
|
200
|
+
self.display_name = attributes[:'display_name'] if attributes[:'display_name']
|
201
|
+
|
202
|
+
self.license_model = attributes[:'licenseModel'] if attributes[:'licenseModel']
|
203
|
+
|
204
|
+
raise 'You cannot provide both :licenseModel and :license_model' if attributes.key?(:'licenseModel') && attributes.key?(:'license_model')
|
205
|
+
|
206
|
+
self.license_model = attributes[:'license_model'] if attributes[:'license_model']
|
207
|
+
|
208
|
+
self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
|
209
|
+
|
210
|
+
raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
|
211
|
+
|
212
|
+
self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
|
213
|
+
|
214
|
+
self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
|
215
|
+
|
216
|
+
raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
|
217
|
+
|
218
|
+
self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
|
219
|
+
|
220
|
+
self.source = attributes[:'source'] if attributes[:'source']
|
221
|
+
self.source = "NONE" if source.nil? && !attributes.key?(:'source') # rubocop:disable Style/StringLiterals
|
222
|
+
end
|
223
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
224
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
225
|
+
|
226
|
+
# Custom attribute writer method checking allowed values (enum).
|
227
|
+
# @param [Object] db_workload Object to be assigned
|
228
|
+
def db_workload=(db_workload)
|
229
|
+
# rubocop: disable Metrics/LineLength
|
230
|
+
raise "Invalid value for 'db_workload': this must be one of the values in DB_WORKLOAD_ENUM." if db_workload && !DB_WORKLOAD_ENUM.include?(db_workload)
|
231
|
+
|
232
|
+
# rubocop: enable Metrics/LineLength
|
233
|
+
@db_workload = db_workload
|
234
|
+
end
|
235
|
+
|
236
|
+
# Custom attribute writer method checking allowed values (enum).
|
237
|
+
# @param [Object] license_model Object to be assigned
|
238
|
+
def license_model=(license_model)
|
239
|
+
# rubocop: disable Metrics/LineLength
|
240
|
+
raise "Invalid value for 'license_model': this must be one of the values in LICENSE_MODEL_ENUM." if license_model && !LICENSE_MODEL_ENUM.include?(license_model)
|
241
|
+
|
242
|
+
# rubocop: enable Metrics/LineLength
|
243
|
+
@license_model = license_model
|
244
|
+
end
|
245
|
+
|
246
|
+
# Custom attribute writer method checking allowed values (enum).
|
247
|
+
# @param [Object] source Object to be assigned
|
248
|
+
def source=(source)
|
249
|
+
# rubocop: disable Metrics/LineLength
|
250
|
+
raise "Invalid value for 'source': this must be one of the values in SOURCE_ENUM." if source && !SOURCE_ENUM.include?(source)
|
251
|
+
|
252
|
+
# rubocop: enable Metrics/LineLength
|
253
|
+
@source = source
|
254
|
+
end
|
255
|
+
|
256
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
257
|
+
|
258
|
+
|
259
|
+
# Checks equality by comparing each attribute.
|
260
|
+
# @param [Object] other the other object to be compared
|
261
|
+
def ==(other)
|
262
|
+
return true if equal?(other)
|
263
|
+
|
264
|
+
self.class == other.class &&
|
265
|
+
compartment_id == other.compartment_id &&
|
266
|
+
db_name == other.db_name &&
|
267
|
+
cpu_core_count == other.cpu_core_count &&
|
268
|
+
db_workload == other.db_workload &&
|
269
|
+
data_storage_size_in_tbs == other.data_storage_size_in_tbs &&
|
270
|
+
admin_password == other.admin_password &&
|
271
|
+
display_name == other.display_name &&
|
272
|
+
license_model == other.license_model &&
|
273
|
+
freeform_tags == other.freeform_tags &&
|
274
|
+
defined_tags == other.defined_tags &&
|
275
|
+
source == other.source
|
276
|
+
end
|
277
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
278
|
+
|
279
|
+
# @see the `==` method
|
280
|
+
# @param [Object] other the other object to be compared
|
281
|
+
def eql?(other)
|
282
|
+
self == other
|
283
|
+
end
|
284
|
+
|
285
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
286
|
+
|
287
|
+
|
288
|
+
# Calculates hash code according to all attributes.
|
289
|
+
# @return [Fixnum] Hash code
|
290
|
+
def hash
|
291
|
+
[compartment_id, db_name, cpu_core_count, db_workload, data_storage_size_in_tbs, admin_password, display_name, license_model, freeform_tags, defined_tags, source].hash
|
292
|
+
end
|
293
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
294
|
+
|
295
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
296
|
+
|
297
|
+
|
298
|
+
# Builds the object from hash
|
299
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
300
|
+
# @return [Object] Returns the model itself
|
301
|
+
def build_from_hash(attributes)
|
302
|
+
return nil unless attributes.is_a?(Hash)
|
303
|
+
|
304
|
+
self.class.swagger_types.each_pair do |key, type|
|
305
|
+
if type =~ /^Array<(.*)>/i
|
306
|
+
# check to ensure the input is an array given that the the attribute
|
307
|
+
# is documented as an array but the input is not
|
308
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
309
|
+
public_method("#{key}=").call(
|
310
|
+
attributes[self.class.attribute_map[key]]
|
311
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
312
|
+
)
|
313
|
+
end
|
314
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
315
|
+
public_method("#{key}=").call(
|
316
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
317
|
+
)
|
318
|
+
end
|
319
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
320
|
+
end
|
321
|
+
|
322
|
+
self
|
323
|
+
end
|
324
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
325
|
+
|
326
|
+
# Returns the string representation of the object
|
327
|
+
# @return [String] String presentation of the object
|
328
|
+
def to_s
|
329
|
+
to_hash.to_s
|
330
|
+
end
|
331
|
+
|
332
|
+
# Returns the object in the form of hash
|
333
|
+
# @return [Hash] Returns the object in the form of hash
|
334
|
+
def to_hash
|
335
|
+
hash = {}
|
336
|
+
self.class.attribute_map.each_pair do |attr, param|
|
337
|
+
value = public_method(attr).call
|
338
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
339
|
+
|
340
|
+
hash[param] = _to_hash(value)
|
341
|
+
end
|
342
|
+
hash
|
343
|
+
end
|
344
|
+
|
345
|
+
private
|
346
|
+
|
347
|
+
# Outputs non-array value in the form of hash
|
348
|
+
# For object, use to_hash. Otherwise, just return the value
|
349
|
+
# @param [Object] value Any valid value
|
350
|
+
# @return [Hash] Returns the value in the form of hash
|
351
|
+
def _to_hash(value)
|
352
|
+
if value.is_a?(Array)
|
353
|
+
value.compact.map { |v| _to_hash(v) }
|
354
|
+
elsif value.is_a?(Hash)
|
355
|
+
{}.tap do |hash|
|
356
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
357
|
+
end
|
358
|
+
elsif value.respond_to? :to_hash
|
359
|
+
value.to_hash
|
360
|
+
else
|
361
|
+
value
|
362
|
+
end
|
363
|
+
end
|
364
|
+
end
|
365
|
+
end
|
366
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|