oci 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/oci.rb +8 -0
- data/lib/oci/api_client.rb +11 -5
- data/lib/oci/config.rb +3 -2
- data/lib/oci/config_file_loader.rb +5 -5
- data/lib/oci/core/blockstorage_client.rb +1 -1
- data/lib/oci/core/compute_client.rb +58 -4
- data/lib/oci/core/core.rb +1 -0
- data/lib/oci/core/models/capture_console_history_details.rb +13 -1
- data/lib/oci/core/models/create_instance_console_connection_details.rb +2 -2
- data/lib/oci/core/models/create_vnic_details.rb +18 -1
- data/lib/oci/core/models/create_volume_details.rb +14 -1
- data/lib/oci/core/models/instance_console_connection.rb +6 -6
- data/lib/oci/core/models/route_rule.rb +4 -1
- data/lib/oci/core/models/update_console_history_details.rb +121 -0
- data/lib/oci/core/models/update_vnic_details.rb +21 -4
- data/lib/oci/core/models/vnic.rb +18 -1
- data/lib/oci/core/models/volume.rb +13 -2
- data/lib/oci/core/models/volume_backup.rb +29 -2
- data/lib/oci/core/virtual_network_client.rb +7 -1
- data/lib/oci/database/database.rb +43 -0
- data/lib/oci/database/database_client.rb +1246 -0
- data/lib/oci/database/models/create_data_guard_association_details.rb +225 -0
- data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +138 -0
- data/lib/oci/database/models/create_database_details.rb +194 -0
- data/lib/oci/database/models/create_db_home_details.rb +141 -0
- data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +152 -0
- data/lib/oci/database/models/data_guard_association.rb +374 -0
- data/lib/oci/database/models/database.rb +261 -0
- data/lib/oci/database/models/database_summary.rb +261 -0
- data/lib/oci/database/models/db_home.rb +216 -0
- data/lib/oci/database/models/db_home_summary.rb +216 -0
- data/lib/oci/database/models/db_node.rb +220 -0
- data/lib/oci/database/models/db_node_summary.rb +220 -0
- data/lib/oci/database/models/db_system.rb +518 -0
- data/lib/oci/database/models/db_system_shape_summary.rb +142 -0
- data/lib/oci/database/models/db_system_summary.rb +518 -0
- data/lib/oci/database/models/db_version_summary.rb +131 -0
- data/lib/oci/database/models/failover_data_guard_association_details.rb +120 -0
- data/lib/oci/database/models/launch_db_system_details.rb +394 -0
- data/lib/oci/database/models/patch.rb +247 -0
- data/lib/oci/database/models/patch_details.rb +144 -0
- data/lib/oci/database/models/patch_history_entry.rb +218 -0
- data/lib/oci/database/models/patch_history_entry_summary.rb +218 -0
- data/lib/oci/database/models/patch_summary.rb +247 -0
- data/lib/oci/database/models/reinstate_data_guard_association_details.rb +120 -0
- data/lib/oci/database/models/switchover_data_guard_association_details.rb +120 -0
- data/lib/oci/database/models/update_db_home_details.rb +119 -0
- data/lib/oci/database/models/update_db_system_details.rb +153 -0
- data/lib/oci/database/util.rb +1 -0
- data/lib/oci/errors.rb +3 -4
- data/lib/oci/regions.rb +4 -2
- data/lib/oci/response_headers.rb +0 -1
- data/lib/oci/signer.rb +8 -7
- data/lib/oci/version.rb +1 -1
- data/lib/oraclebmc.rb +3 -1
- metadata +33 -2
@@ -0,0 +1,120 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
6
|
+
class Database::Models::ReinstateDataGuardAssociationDetails
|
7
|
+
# The DB System administrator password.
|
8
|
+
# @return [String]
|
9
|
+
attr_accessor :database_admin_password
|
10
|
+
|
11
|
+
|
12
|
+
# Initializes the object
|
13
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
14
|
+
def initialize(attributes = {})
|
15
|
+
return unless attributes.is_a?(Hash)
|
16
|
+
|
17
|
+
# convert string to symbol for hash key
|
18
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
19
|
+
|
20
|
+
if attributes[:'databaseAdminPassword']
|
21
|
+
self.database_admin_password = attributes[:'databaseAdminPassword']
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
# Checks equality by comparing each attribute.
|
27
|
+
# @param [Object] other_object to be compared
|
28
|
+
def ==(other_object)
|
29
|
+
return true if self.equal?(other_object)
|
30
|
+
self.class == other_object.class &&
|
31
|
+
database_admin_password == other_object.database_admin_password
|
32
|
+
end
|
33
|
+
|
34
|
+
# @see the `==` method
|
35
|
+
# @param [Object] other_object to be compared
|
36
|
+
def eql?(other_object)
|
37
|
+
self == other_object
|
38
|
+
end
|
39
|
+
|
40
|
+
# Calculates hash code according to all attributes.
|
41
|
+
# @return [Fixnum] Hash code
|
42
|
+
def hash
|
43
|
+
[database_admin_password].hash
|
44
|
+
end
|
45
|
+
|
46
|
+
# Builds the object from hash
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
+
# @return [Object] Returns the model itself
|
49
|
+
def build_from_hash(attributes)
|
50
|
+
return nil unless attributes.is_a?(Hash)
|
51
|
+
self.class.swagger_types.each_pair do |key, type|
|
52
|
+
if type =~ /^Array<(.*)>/i
|
53
|
+
# check to ensure the input is an array given that the the attribute
|
54
|
+
# is documented as an array but the input is not
|
55
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
56
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
57
|
+
end
|
58
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
59
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
60
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
61
|
+
end
|
62
|
+
|
63
|
+
self
|
64
|
+
end
|
65
|
+
|
66
|
+
# Returns the string representation of the object
|
67
|
+
# @return [String] String presentation of the object
|
68
|
+
def to_s
|
69
|
+
to_hash.to_s
|
70
|
+
end
|
71
|
+
|
72
|
+
# Returns the object in the form of hash
|
73
|
+
# @return [Hash] Returns the object in the form of hash
|
74
|
+
def to_hash
|
75
|
+
hash = {}
|
76
|
+
self.class.attribute_map.each_pair do |attr, param|
|
77
|
+
value = self.send(attr)
|
78
|
+
next if value.nil?
|
79
|
+
hash[param] = _to_hash(value)
|
80
|
+
end
|
81
|
+
hash
|
82
|
+
end
|
83
|
+
|
84
|
+
private
|
85
|
+
|
86
|
+
# Outputs non-array value in the form of hash
|
87
|
+
# For object, use to_hash. Otherwise, just return the value
|
88
|
+
# @param [Object] value Any valid value
|
89
|
+
# @return [Hash] Returns the value in the form of hash
|
90
|
+
def _to_hash(value)
|
91
|
+
if value.is_a?(Array)
|
92
|
+
value.compact.map{ |v| _to_hash(v) }
|
93
|
+
elsif value.is_a?(Hash)
|
94
|
+
{}.tap do |hash|
|
95
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
96
|
+
end
|
97
|
+
elsif value.respond_to? :to_hash
|
98
|
+
value.to_hash
|
99
|
+
else
|
100
|
+
value
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
107
|
+
def self.attribute_map
|
108
|
+
{
|
109
|
+
:'database_admin_password' => :'databaseAdminPassword'
|
110
|
+
}
|
111
|
+
end
|
112
|
+
|
113
|
+
# Attribute type mapping.
|
114
|
+
def self.swagger_types
|
115
|
+
{
|
116
|
+
:'database_admin_password' => :'String'
|
117
|
+
}
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
@@ -0,0 +1,120 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
6
|
+
class Database::Models::SwitchoverDataGuardAssociationDetails
|
7
|
+
# The DB System administrator password.
|
8
|
+
# @return [String]
|
9
|
+
attr_accessor :database_admin_password
|
10
|
+
|
11
|
+
|
12
|
+
# Initializes the object
|
13
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
14
|
+
def initialize(attributes = {})
|
15
|
+
return unless attributes.is_a?(Hash)
|
16
|
+
|
17
|
+
# convert string to symbol for hash key
|
18
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
19
|
+
|
20
|
+
if attributes[:'databaseAdminPassword']
|
21
|
+
self.database_admin_password = attributes[:'databaseAdminPassword']
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
# Checks equality by comparing each attribute.
|
27
|
+
# @param [Object] other_object to be compared
|
28
|
+
def ==(other_object)
|
29
|
+
return true if self.equal?(other_object)
|
30
|
+
self.class == other_object.class &&
|
31
|
+
database_admin_password == other_object.database_admin_password
|
32
|
+
end
|
33
|
+
|
34
|
+
# @see the `==` method
|
35
|
+
# @param [Object] other_object to be compared
|
36
|
+
def eql?(other_object)
|
37
|
+
self == other_object
|
38
|
+
end
|
39
|
+
|
40
|
+
# Calculates hash code according to all attributes.
|
41
|
+
# @return [Fixnum] Hash code
|
42
|
+
def hash
|
43
|
+
[database_admin_password].hash
|
44
|
+
end
|
45
|
+
|
46
|
+
# Builds the object from hash
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
+
# @return [Object] Returns the model itself
|
49
|
+
def build_from_hash(attributes)
|
50
|
+
return nil unless attributes.is_a?(Hash)
|
51
|
+
self.class.swagger_types.each_pair do |key, type|
|
52
|
+
if type =~ /^Array<(.*)>/i
|
53
|
+
# check to ensure the input is an array given that the the attribute
|
54
|
+
# is documented as an array but the input is not
|
55
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
56
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
57
|
+
end
|
58
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
59
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
60
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
61
|
+
end
|
62
|
+
|
63
|
+
self
|
64
|
+
end
|
65
|
+
|
66
|
+
# Returns the string representation of the object
|
67
|
+
# @return [String] String presentation of the object
|
68
|
+
def to_s
|
69
|
+
to_hash.to_s
|
70
|
+
end
|
71
|
+
|
72
|
+
# Returns the object in the form of hash
|
73
|
+
# @return [Hash] Returns the object in the form of hash
|
74
|
+
def to_hash
|
75
|
+
hash = {}
|
76
|
+
self.class.attribute_map.each_pair do |attr, param|
|
77
|
+
value = self.send(attr)
|
78
|
+
next if value.nil?
|
79
|
+
hash[param] = _to_hash(value)
|
80
|
+
end
|
81
|
+
hash
|
82
|
+
end
|
83
|
+
|
84
|
+
private
|
85
|
+
|
86
|
+
# Outputs non-array value in the form of hash
|
87
|
+
# For object, use to_hash. Otherwise, just return the value
|
88
|
+
# @param [Object] value Any valid value
|
89
|
+
# @return [Hash] Returns the value in the form of hash
|
90
|
+
def _to_hash(value)
|
91
|
+
if value.is_a?(Array)
|
92
|
+
value.compact.map{ |v| _to_hash(v) }
|
93
|
+
elsif value.is_a?(Hash)
|
94
|
+
{}.tap do |hash|
|
95
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
96
|
+
end
|
97
|
+
elsif value.respond_to? :to_hash
|
98
|
+
value.to_hash
|
99
|
+
else
|
100
|
+
value
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
107
|
+
def self.attribute_map
|
108
|
+
{
|
109
|
+
:'database_admin_password' => :'databaseAdminPassword'
|
110
|
+
}
|
111
|
+
end
|
112
|
+
|
113
|
+
# Attribute type mapping.
|
114
|
+
def self.swagger_types
|
115
|
+
{
|
116
|
+
:'database_admin_password' => :'String'
|
117
|
+
}
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
@@ -0,0 +1,119 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
6
|
+
class Database::Models::UpdateDbHomeDetails
|
7
|
+
# @return [OCI::Database::Models::PatchDetails]
|
8
|
+
attr_accessor :db_version
|
9
|
+
|
10
|
+
|
11
|
+
# Initializes the object
|
12
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
13
|
+
def initialize(attributes = {})
|
14
|
+
return unless attributes.is_a?(Hash)
|
15
|
+
|
16
|
+
# convert string to symbol for hash key
|
17
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
18
|
+
|
19
|
+
if attributes[:'dbVersion']
|
20
|
+
self.db_version = attributes[:'dbVersion']
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
# Checks equality by comparing each attribute.
|
26
|
+
# @param [Object] other_object to be compared
|
27
|
+
def ==(other_object)
|
28
|
+
return true if self.equal?(other_object)
|
29
|
+
self.class == other_object.class &&
|
30
|
+
db_version == other_object.db_version
|
31
|
+
end
|
32
|
+
|
33
|
+
# @see the `==` method
|
34
|
+
# @param [Object] other_object to be compared
|
35
|
+
def eql?(other_object)
|
36
|
+
self == other_object
|
37
|
+
end
|
38
|
+
|
39
|
+
# Calculates hash code according to all attributes.
|
40
|
+
# @return [Fixnum] Hash code
|
41
|
+
def hash
|
42
|
+
[db_version].hash
|
43
|
+
end
|
44
|
+
|
45
|
+
# Builds the object from hash
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
# @return [Object] Returns the model itself
|
48
|
+
def build_from_hash(attributes)
|
49
|
+
return nil unless attributes.is_a?(Hash)
|
50
|
+
self.class.swagger_types.each_pair do |key, type|
|
51
|
+
if type =~ /^Array<(.*)>/i
|
52
|
+
# check to ensure the input is an array given that the the attribute
|
53
|
+
# is documented as an array but the input is not
|
54
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
55
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
56
|
+
end
|
57
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
58
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
59
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
60
|
+
end
|
61
|
+
|
62
|
+
self
|
63
|
+
end
|
64
|
+
|
65
|
+
# Returns the string representation of the object
|
66
|
+
# @return [String] String presentation of the object
|
67
|
+
def to_s
|
68
|
+
to_hash.to_s
|
69
|
+
end
|
70
|
+
|
71
|
+
# Returns the object in the form of hash
|
72
|
+
# @return [Hash] Returns the object in the form of hash
|
73
|
+
def to_hash
|
74
|
+
hash = {}
|
75
|
+
self.class.attribute_map.each_pair do |attr, param|
|
76
|
+
value = self.send(attr)
|
77
|
+
next if value.nil?
|
78
|
+
hash[param] = _to_hash(value)
|
79
|
+
end
|
80
|
+
hash
|
81
|
+
end
|
82
|
+
|
83
|
+
private
|
84
|
+
|
85
|
+
# Outputs non-array value in the form of hash
|
86
|
+
# For object, use to_hash. Otherwise, just return the value
|
87
|
+
# @param [Object] value Any valid value
|
88
|
+
# @return [Hash] Returns the value in the form of hash
|
89
|
+
def _to_hash(value)
|
90
|
+
if value.is_a?(Array)
|
91
|
+
value.compact.map{ |v| _to_hash(v) }
|
92
|
+
elsif value.is_a?(Hash)
|
93
|
+
{}.tap do |hash|
|
94
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
95
|
+
end
|
96
|
+
elsif value.respond_to? :to_hash
|
97
|
+
value.to_hash
|
98
|
+
else
|
99
|
+
value
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
106
|
+
def self.attribute_map
|
107
|
+
{
|
108
|
+
:'db_version' => :'dbVersion'
|
109
|
+
}
|
110
|
+
end
|
111
|
+
|
112
|
+
# Attribute type mapping.
|
113
|
+
def self.swagger_types
|
114
|
+
{
|
115
|
+
:'db_version' => :'OCI::Database::Models::PatchDetails'
|
116
|
+
}
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
@@ -0,0 +1,153 @@
|
|
1
|
+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
6
|
+
class Database::Models::UpdateDbSystemDetails
|
7
|
+
# The number of CPU Cores to be set on the DB System. Applicable only for non-VM based DB systems.
|
8
|
+
# @return [Integer]
|
9
|
+
attr_accessor :cpu_core_count
|
10
|
+
|
11
|
+
# Size, in GBs, to which the currently attached storage needs to be scaled up to for VM based DB system. This must be greater than current storage size. Note that the total storage size attached will be more than what is requested, to account for REDO/RECO space and software volume.
|
12
|
+
#
|
13
|
+
# @return [Integer]
|
14
|
+
attr_accessor :data_storage_size_in_gb
|
15
|
+
|
16
|
+
# The public key portion of the key pair to use for SSH access to the DB System. Multiple public keys can be provided. The length of the combined keys cannot exceed 10,000 characters.
|
17
|
+
# @return [Array<String>]
|
18
|
+
attr_accessor :ssh_public_keys
|
19
|
+
|
20
|
+
# @return [OCI::Database::Models::PatchDetails]
|
21
|
+
attr_accessor :version
|
22
|
+
|
23
|
+
|
24
|
+
# Initializes the object
|
25
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
26
|
+
def initialize(attributes = {})
|
27
|
+
return unless attributes.is_a?(Hash)
|
28
|
+
|
29
|
+
# convert string to symbol for hash key
|
30
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
31
|
+
|
32
|
+
if attributes[:'cpuCoreCount']
|
33
|
+
self.cpu_core_count = attributes[:'cpuCoreCount']
|
34
|
+
end
|
35
|
+
|
36
|
+
if attributes[:'dataStorageSizeInGB']
|
37
|
+
self.data_storage_size_in_gb = attributes[:'dataStorageSizeInGB']
|
38
|
+
end
|
39
|
+
|
40
|
+
if attributes[:'sshPublicKeys']
|
41
|
+
self.ssh_public_keys = attributes[:'sshPublicKeys']
|
42
|
+
end
|
43
|
+
|
44
|
+
if attributes[:'version']
|
45
|
+
self.version = attributes[:'version']
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
# Checks equality by comparing each attribute.
|
51
|
+
# @param [Object] other_object to be compared
|
52
|
+
def ==(other_object)
|
53
|
+
return true if self.equal?(other_object)
|
54
|
+
self.class == other_object.class &&
|
55
|
+
cpu_core_count == other_object.cpu_core_count &&
|
56
|
+
data_storage_size_in_gb == other_object.data_storage_size_in_gb &&
|
57
|
+
ssh_public_keys == other_object.ssh_public_keys &&
|
58
|
+
version == other_object.version
|
59
|
+
end
|
60
|
+
|
61
|
+
# @see the `==` method
|
62
|
+
# @param [Object] other_object to be compared
|
63
|
+
def eql?(other_object)
|
64
|
+
self == other_object
|
65
|
+
end
|
66
|
+
|
67
|
+
# Calculates hash code according to all attributes.
|
68
|
+
# @return [Fixnum] Hash code
|
69
|
+
def hash
|
70
|
+
[cpu_core_count, data_storage_size_in_gb, ssh_public_keys, version].hash
|
71
|
+
end
|
72
|
+
|
73
|
+
# Builds the object from hash
|
74
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
75
|
+
# @return [Object] Returns the model itself
|
76
|
+
def build_from_hash(attributes)
|
77
|
+
return nil unless attributes.is_a?(Hash)
|
78
|
+
self.class.swagger_types.each_pair do |key, type|
|
79
|
+
if type =~ /^Array<(.*)>/i
|
80
|
+
# check to ensure the input is an array given that the the attribute
|
81
|
+
# is documented as an array but the input is not
|
82
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
83
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
84
|
+
end
|
85
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
86
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
87
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
88
|
+
end
|
89
|
+
|
90
|
+
self
|
91
|
+
end
|
92
|
+
|
93
|
+
# Returns the string representation of the object
|
94
|
+
# @return [String] String presentation of the object
|
95
|
+
def to_s
|
96
|
+
to_hash.to_s
|
97
|
+
end
|
98
|
+
|
99
|
+
# Returns the object in the form of hash
|
100
|
+
# @return [Hash] Returns the object in the form of hash
|
101
|
+
def to_hash
|
102
|
+
hash = {}
|
103
|
+
self.class.attribute_map.each_pair do |attr, param|
|
104
|
+
value = self.send(attr)
|
105
|
+
next if value.nil?
|
106
|
+
hash[param] = _to_hash(value)
|
107
|
+
end
|
108
|
+
hash
|
109
|
+
end
|
110
|
+
|
111
|
+
private
|
112
|
+
|
113
|
+
# Outputs non-array value in the form of hash
|
114
|
+
# For object, use to_hash. Otherwise, just return the value
|
115
|
+
# @param [Object] value Any valid value
|
116
|
+
# @return [Hash] Returns the value in the form of hash
|
117
|
+
def _to_hash(value)
|
118
|
+
if value.is_a?(Array)
|
119
|
+
value.compact.map{ |v| _to_hash(v) }
|
120
|
+
elsif value.is_a?(Hash)
|
121
|
+
{}.tap do |hash|
|
122
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
123
|
+
end
|
124
|
+
elsif value.respond_to? :to_hash
|
125
|
+
value.to_hash
|
126
|
+
else
|
127
|
+
value
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
134
|
+
def self.attribute_map
|
135
|
+
{
|
136
|
+
:'cpu_core_count' => :'cpuCoreCount',
|
137
|
+
:'data_storage_size_in_gb' => :'dataStorageSizeInGB',
|
138
|
+
:'ssh_public_keys' => :'sshPublicKeys',
|
139
|
+
:'version' => :'version'
|
140
|
+
}
|
141
|
+
end
|
142
|
+
|
143
|
+
# Attribute type mapping.
|
144
|
+
def self.swagger_types
|
145
|
+
{
|
146
|
+
:'cpu_core_count' => :'Integer',
|
147
|
+
:'data_storage_size_in_gb' => :'Integer',
|
148
|
+
:'ssh_public_keys' => :'Array<String>',
|
149
|
+
:'version' => :'OCI::Database::Models::PatchDetails'
|
150
|
+
}
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|