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,141 @@
|
|
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::CreateDbHomeDetails
|
7
|
+
# @return [OCI::Database::Models::CreateDatabaseDetails]
|
8
|
+
attr_accessor :database
|
9
|
+
|
10
|
+
# A valid Oracle database version. To get a list of supported versions, use the {#list_db_versions list_db_versions} operation.
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :db_version
|
13
|
+
|
14
|
+
# The user-provided name of the database home.
|
15
|
+
# @return [String]
|
16
|
+
attr_accessor :display_name
|
17
|
+
|
18
|
+
|
19
|
+
# Initializes the object
|
20
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
21
|
+
def initialize(attributes = {})
|
22
|
+
return unless attributes.is_a?(Hash)
|
23
|
+
|
24
|
+
# convert string to symbol for hash key
|
25
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
26
|
+
|
27
|
+
if attributes[:'database']
|
28
|
+
self.database = attributes[:'database']
|
29
|
+
end
|
30
|
+
|
31
|
+
if attributes[:'dbVersion']
|
32
|
+
self.db_version = attributes[:'dbVersion']
|
33
|
+
end
|
34
|
+
|
35
|
+
if attributes[:'displayName']
|
36
|
+
self.display_name = attributes[:'displayName']
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
# Checks equality by comparing each attribute.
|
42
|
+
# @param [Object] other_object to be compared
|
43
|
+
def ==(other_object)
|
44
|
+
return true if self.equal?(other_object)
|
45
|
+
self.class == other_object.class &&
|
46
|
+
database == other_object.database &&
|
47
|
+
db_version == other_object.db_version &&
|
48
|
+
display_name == other_object.display_name
|
49
|
+
end
|
50
|
+
|
51
|
+
# @see the `==` method
|
52
|
+
# @param [Object] other_object to be compared
|
53
|
+
def eql?(other_object)
|
54
|
+
self == other_object
|
55
|
+
end
|
56
|
+
|
57
|
+
# Calculates hash code according to all attributes.
|
58
|
+
# @return [Fixnum] Hash code
|
59
|
+
def hash
|
60
|
+
[database, db_version, display_name].hash
|
61
|
+
end
|
62
|
+
|
63
|
+
# Builds the object from hash
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
65
|
+
# @return [Object] Returns the model itself
|
66
|
+
def build_from_hash(attributes)
|
67
|
+
return nil unless attributes.is_a?(Hash)
|
68
|
+
self.class.swagger_types.each_pair do |key, type|
|
69
|
+
if type =~ /^Array<(.*)>/i
|
70
|
+
# check to ensure the input is an array given that the the attribute
|
71
|
+
# is documented as an array but the input is not
|
72
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
73
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
74
|
+
end
|
75
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
76
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
77
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
78
|
+
end
|
79
|
+
|
80
|
+
self
|
81
|
+
end
|
82
|
+
|
83
|
+
# Returns the string representation of the object
|
84
|
+
# @return [String] String presentation of the object
|
85
|
+
def to_s
|
86
|
+
to_hash.to_s
|
87
|
+
end
|
88
|
+
|
89
|
+
# Returns the object in the form of hash
|
90
|
+
# @return [Hash] Returns the object in the form of hash
|
91
|
+
def to_hash
|
92
|
+
hash = {}
|
93
|
+
self.class.attribute_map.each_pair do |attr, param|
|
94
|
+
value = self.send(attr)
|
95
|
+
next if value.nil?
|
96
|
+
hash[param] = _to_hash(value)
|
97
|
+
end
|
98
|
+
hash
|
99
|
+
end
|
100
|
+
|
101
|
+
private
|
102
|
+
|
103
|
+
# Outputs non-array value in the form of hash
|
104
|
+
# For object, use to_hash. Otherwise, just return the value
|
105
|
+
# @param [Object] value Any valid value
|
106
|
+
# @return [Hash] Returns the value in the form of hash
|
107
|
+
def _to_hash(value)
|
108
|
+
if value.is_a?(Array)
|
109
|
+
value.compact.map{ |v| _to_hash(v) }
|
110
|
+
elsif value.is_a?(Hash)
|
111
|
+
{}.tap do |hash|
|
112
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
113
|
+
end
|
114
|
+
elsif value.respond_to? :to_hash
|
115
|
+
value.to_hash
|
116
|
+
else
|
117
|
+
value
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
124
|
+
def self.attribute_map
|
125
|
+
{
|
126
|
+
:'database' => :'database',
|
127
|
+
:'db_version' => :'dbVersion',
|
128
|
+
:'display_name' => :'displayName'
|
129
|
+
}
|
130
|
+
end
|
131
|
+
|
132
|
+
# Attribute type mapping.
|
133
|
+
def self.swagger_types
|
134
|
+
{
|
135
|
+
:'database' => :'OCI::Database::Models::CreateDatabaseDetails',
|
136
|
+
:'db_version' => :'String',
|
137
|
+
:'display_name' => :'String'
|
138
|
+
}
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
@@ -0,0 +1,152 @@
|
|
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::CreateDbHomeWithDbSystemIdDetails
|
7
|
+
# @return [OCI::Database::Models::CreateDatabaseDetails]
|
8
|
+
attr_accessor :database
|
9
|
+
|
10
|
+
# The OCID of the DB System.
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :db_system_id
|
13
|
+
|
14
|
+
# A valid Oracle database version. To get a list of supported versions, use the {#list_db_versions list_db_versions} operation.
|
15
|
+
# @return [String]
|
16
|
+
attr_accessor :db_version
|
17
|
+
|
18
|
+
# The user-provided name of the database home.
|
19
|
+
# @return [String]
|
20
|
+
attr_accessor :display_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
|
+
if attributes[:'database']
|
32
|
+
self.database = attributes[:'database']
|
33
|
+
end
|
34
|
+
|
35
|
+
if attributes[:'dbSystemId']
|
36
|
+
self.db_system_id = attributes[:'dbSystemId']
|
37
|
+
end
|
38
|
+
|
39
|
+
if attributes[:'dbVersion']
|
40
|
+
self.db_version = attributes[:'dbVersion']
|
41
|
+
end
|
42
|
+
|
43
|
+
if attributes[:'displayName']
|
44
|
+
self.display_name = attributes[:'displayName']
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
# Checks equality by comparing each attribute.
|
50
|
+
# @param [Object] other_object to be compared
|
51
|
+
def ==(other_object)
|
52
|
+
return true if self.equal?(other_object)
|
53
|
+
self.class == other_object.class &&
|
54
|
+
database == other_object.database &&
|
55
|
+
db_system_id == other_object.db_system_id &&
|
56
|
+
db_version == other_object.db_version &&
|
57
|
+
display_name == other_object.display_name
|
58
|
+
end
|
59
|
+
|
60
|
+
# @see the `==` method
|
61
|
+
# @param [Object] other_object to be compared
|
62
|
+
def eql?(other_object)
|
63
|
+
self == other_object
|
64
|
+
end
|
65
|
+
|
66
|
+
# Calculates hash code according to all attributes.
|
67
|
+
# @return [Fixnum] Hash code
|
68
|
+
def hash
|
69
|
+
[database, db_system_id, db_version, display_name].hash
|
70
|
+
end
|
71
|
+
|
72
|
+
# Builds the object from hash
|
73
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
74
|
+
# @return [Object] Returns the model itself
|
75
|
+
def build_from_hash(attributes)
|
76
|
+
return nil unless attributes.is_a?(Hash)
|
77
|
+
self.class.swagger_types.each_pair do |key, type|
|
78
|
+
if type =~ /^Array<(.*)>/i
|
79
|
+
# check to ensure the input is an array given that the the attribute
|
80
|
+
# is documented as an array but the input is not
|
81
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
82
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
83
|
+
end
|
84
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
85
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
86
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
87
|
+
end
|
88
|
+
|
89
|
+
self
|
90
|
+
end
|
91
|
+
|
92
|
+
# Returns the string representation of the object
|
93
|
+
# @return [String] String presentation of the object
|
94
|
+
def to_s
|
95
|
+
to_hash.to_s
|
96
|
+
end
|
97
|
+
|
98
|
+
# Returns the object in the form of hash
|
99
|
+
# @return [Hash] Returns the object in the form of hash
|
100
|
+
def to_hash
|
101
|
+
hash = {}
|
102
|
+
self.class.attribute_map.each_pair do |attr, param|
|
103
|
+
value = self.send(attr)
|
104
|
+
next if value.nil?
|
105
|
+
hash[param] = _to_hash(value)
|
106
|
+
end
|
107
|
+
hash
|
108
|
+
end
|
109
|
+
|
110
|
+
private
|
111
|
+
|
112
|
+
# Outputs non-array value in the form of hash
|
113
|
+
# For object, use to_hash. Otherwise, just return the value
|
114
|
+
# @param [Object] value Any valid value
|
115
|
+
# @return [Hash] Returns the value in the form of hash
|
116
|
+
def _to_hash(value)
|
117
|
+
if value.is_a?(Array)
|
118
|
+
value.compact.map{ |v| _to_hash(v) }
|
119
|
+
elsif value.is_a?(Hash)
|
120
|
+
{}.tap do |hash|
|
121
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
122
|
+
end
|
123
|
+
elsif value.respond_to? :to_hash
|
124
|
+
value.to_hash
|
125
|
+
else
|
126
|
+
value
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
133
|
+
def self.attribute_map
|
134
|
+
{
|
135
|
+
:'database' => :'database',
|
136
|
+
:'db_system_id' => :'dbSystemId',
|
137
|
+
:'db_version' => :'dbVersion',
|
138
|
+
:'display_name' => :'displayName'
|
139
|
+
}
|
140
|
+
end
|
141
|
+
|
142
|
+
# Attribute type mapping.
|
143
|
+
def self.swagger_types
|
144
|
+
{
|
145
|
+
:'database' => :'OCI::Database::Models::CreateDatabaseDetails',
|
146
|
+
:'db_system_id' => :'String',
|
147
|
+
:'db_version' => :'String',
|
148
|
+
:'display_name' => :'String'
|
149
|
+
}
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
@@ -0,0 +1,374 @@
|
|
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::DataGuardAssociation
|
7
|
+
|
8
|
+
LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING',
|
9
|
+
LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE',
|
10
|
+
LIFECYCLE_STATE_UPDATING = 'UPDATING',
|
11
|
+
LIFECYCLE_STATE_TERMINATING = 'TERMINATING',
|
12
|
+
LIFECYCLE_STATE_TERMINATED = 'TERMINATED',
|
13
|
+
LIFECYCLE_STATE_FAILED = 'FAILED',
|
14
|
+
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
15
|
+
|
16
|
+
|
17
|
+
PEER_ROLE_ENUM = [PEER_ROLE_PRIMARY = 'PRIMARY',
|
18
|
+
PEER_ROLE_STANDBY = 'STANDBY',
|
19
|
+
PEER_ROLE_DISABLED_STANDBY = 'DISABLED_STANDBY',
|
20
|
+
PEER_ROLE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
21
|
+
|
22
|
+
|
23
|
+
PROTECTION_MODE_ENUM = [PROTECTION_MODE_MAXIMUM_AVAILABILITY = 'MAXIMUM_AVAILABILITY',
|
24
|
+
PROTECTION_MODE_MAXIMUM_PERFORMANCE = 'MAXIMUM_PERFORMANCE',
|
25
|
+
PROTECTION_MODE_MAXIMUM_PROTECTION = 'MAXIMUM_PROTECTION',
|
26
|
+
PROTECTION_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
27
|
+
|
28
|
+
|
29
|
+
ROLE_ENUM = [ROLE_PRIMARY = 'PRIMARY',
|
30
|
+
ROLE_STANDBY = 'STANDBY',
|
31
|
+
ROLE_DISABLED_STANDBY = 'DISABLED_STANDBY',
|
32
|
+
ROLE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
33
|
+
|
34
|
+
|
35
|
+
TRANSPORT_TYPE_ENUM = [TRANSPORT_TYPE_SYNC = 'SYNC',
|
36
|
+
TRANSPORT_TYPE_ASYNC = 'ASYNC',
|
37
|
+
TRANSPORT_TYPE_FASTSYNC = 'FASTSYNC',
|
38
|
+
TRANSPORT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
39
|
+
|
40
|
+
# The lag time between updates to the primary database and application of the redo data on the standby database,
|
41
|
+
# as computed by the reporting database.
|
42
|
+
#
|
43
|
+
# Example: `9 seconds`
|
44
|
+
#
|
45
|
+
# @return [String]
|
46
|
+
attr_accessor :apply_lag
|
47
|
+
|
48
|
+
# The rate at which redo logs are synced between the associated databases.
|
49
|
+
#
|
50
|
+
# Example: `180 Mb per second`
|
51
|
+
#
|
52
|
+
# @return [String]
|
53
|
+
attr_accessor :apply_rate
|
54
|
+
|
55
|
+
# The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the reporting database.
|
56
|
+
# @return [String]
|
57
|
+
attr_accessor :database_id
|
58
|
+
|
59
|
+
# The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Data Guard association.
|
60
|
+
# @return [String]
|
61
|
+
attr_accessor :id
|
62
|
+
|
63
|
+
# Additional information about the current lifecycleState, if available.
|
64
|
+
#
|
65
|
+
# @return [String]
|
66
|
+
attr_accessor :lifecycle_details
|
67
|
+
|
68
|
+
# The current state of the Data Guard association.
|
69
|
+
# @return [String]
|
70
|
+
attr_accessor :lifecycle_state
|
71
|
+
|
72
|
+
# The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the peer database's Data Guard association.
|
73
|
+
# @return [String]
|
74
|
+
attr_accessor :peer_data_guard_association_id
|
75
|
+
|
76
|
+
# The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the associated peer database.
|
77
|
+
# @return [String]
|
78
|
+
attr_accessor :peer_database_id
|
79
|
+
|
80
|
+
# The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the database home containing the associated peer database.
|
81
|
+
#
|
82
|
+
# @return [String]
|
83
|
+
attr_accessor :peer_db_home_id
|
84
|
+
|
85
|
+
# The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the DB System containing the associated
|
86
|
+
# peer database.
|
87
|
+
#
|
88
|
+
# @return [String]
|
89
|
+
attr_accessor :peer_db_system_id
|
90
|
+
|
91
|
+
# The role of the peer database in this Data Guard association.
|
92
|
+
# @return [String]
|
93
|
+
attr_accessor :peer_role
|
94
|
+
|
95
|
+
# The protection mode of this Data Guard association. For more information, see
|
96
|
+
# [Oracle Data Guard Protection Modes](http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-protection-modes.htm#SBYDB02000)
|
97
|
+
# in the Oracle Data Guard documentation.
|
98
|
+
#
|
99
|
+
# @return [String]
|
100
|
+
attr_accessor :protection_mode
|
101
|
+
|
102
|
+
# The role of the reporting database in this Data Guard association.
|
103
|
+
# @return [String]
|
104
|
+
attr_accessor :role
|
105
|
+
|
106
|
+
# The date and time the Data Guard Association was created.
|
107
|
+
# @return [DateTime]
|
108
|
+
attr_accessor :time_created
|
109
|
+
|
110
|
+
# The redo transport type used by this Data Guard association. For more information, see
|
111
|
+
# [Redo Transport Services](http://docs.oracle.com/database/122/SBYDB/oracle-data-guard-redo-transport-services.htm#SBYDB00400)
|
112
|
+
# in the Oracle Data Guard documentation.
|
113
|
+
#
|
114
|
+
# @return [String]
|
115
|
+
attr_accessor :transport_type
|
116
|
+
|
117
|
+
|
118
|
+
# Initializes the object
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
120
|
+
def initialize(attributes = {})
|
121
|
+
return unless attributes.is_a?(Hash)
|
122
|
+
|
123
|
+
# convert string to symbol for hash key
|
124
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
125
|
+
|
126
|
+
if attributes[:'applyLag']
|
127
|
+
self.apply_lag = attributes[:'applyLag']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes[:'applyRate']
|
131
|
+
self.apply_rate = attributes[:'applyRate']
|
132
|
+
end
|
133
|
+
|
134
|
+
if attributes[:'databaseId']
|
135
|
+
self.database_id = attributes[:'databaseId']
|
136
|
+
end
|
137
|
+
|
138
|
+
if attributes[:'id']
|
139
|
+
self.id = attributes[:'id']
|
140
|
+
end
|
141
|
+
|
142
|
+
if attributes[:'lifecycleDetails']
|
143
|
+
self.lifecycle_details = attributes[:'lifecycleDetails']
|
144
|
+
end
|
145
|
+
|
146
|
+
if attributes[:'lifecycleState']
|
147
|
+
self.lifecycle_state = attributes[:'lifecycleState']
|
148
|
+
end
|
149
|
+
|
150
|
+
if attributes[:'peerDataGuardAssociationId']
|
151
|
+
self.peer_data_guard_association_id = attributes[:'peerDataGuardAssociationId']
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes[:'peerDatabaseId']
|
155
|
+
self.peer_database_id = attributes[:'peerDatabaseId']
|
156
|
+
end
|
157
|
+
|
158
|
+
if attributes[:'peerDbHomeId']
|
159
|
+
self.peer_db_home_id = attributes[:'peerDbHomeId']
|
160
|
+
end
|
161
|
+
|
162
|
+
if attributes[:'peerDbSystemId']
|
163
|
+
self.peer_db_system_id = attributes[:'peerDbSystemId']
|
164
|
+
end
|
165
|
+
|
166
|
+
if attributes[:'peerRole']
|
167
|
+
self.peer_role = attributes[:'peerRole']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes[:'protectionMode']
|
171
|
+
self.protection_mode = attributes[:'protectionMode']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes[:'role']
|
175
|
+
self.role = attributes[:'role']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes[:'timeCreated']
|
179
|
+
self.time_created = attributes[:'timeCreated']
|
180
|
+
end
|
181
|
+
|
182
|
+
if attributes[:'transportType']
|
183
|
+
self.transport_type = attributes[:'transportType']
|
184
|
+
end
|
185
|
+
|
186
|
+
end
|
187
|
+
|
188
|
+
# Custom attribute writer method checking allowed values (enum).
|
189
|
+
# @param [Object] lifecycle_state Object to be assigned
|
190
|
+
def lifecycle_state=(lifecycle_state)
|
191
|
+
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
192
|
+
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
193
|
+
else
|
194
|
+
@lifecycle_state = lifecycle_state
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
# Custom attribute writer method checking allowed values (enum).
|
199
|
+
# @param [Object] peer_role Object to be assigned
|
200
|
+
def peer_role=(peer_role)
|
201
|
+
if peer_role && !PEER_ROLE_ENUM.include?(peer_role)
|
202
|
+
@peer_role = PEER_ROLE_UNKNOWN_ENUM_VALUE
|
203
|
+
else
|
204
|
+
@peer_role = peer_role
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
# Custom attribute writer method checking allowed values (enum).
|
209
|
+
# @param [Object] protection_mode Object to be assigned
|
210
|
+
def protection_mode=(protection_mode)
|
211
|
+
if protection_mode && !PROTECTION_MODE_ENUM.include?(protection_mode)
|
212
|
+
@protection_mode = PROTECTION_MODE_UNKNOWN_ENUM_VALUE
|
213
|
+
else
|
214
|
+
@protection_mode = protection_mode
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
# Custom attribute writer method checking allowed values (enum).
|
219
|
+
# @param [Object] role Object to be assigned
|
220
|
+
def role=(role)
|
221
|
+
if role && !ROLE_ENUM.include?(role)
|
222
|
+
@role = ROLE_UNKNOWN_ENUM_VALUE
|
223
|
+
else
|
224
|
+
@role = role
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
# Custom attribute writer method checking allowed values (enum).
|
229
|
+
# @param [Object] transport_type Object to be assigned
|
230
|
+
def transport_type=(transport_type)
|
231
|
+
if transport_type && !TRANSPORT_TYPE_ENUM.include?(transport_type)
|
232
|
+
@transport_type = TRANSPORT_TYPE_UNKNOWN_ENUM_VALUE
|
233
|
+
else
|
234
|
+
@transport_type = transport_type
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
# Checks equality by comparing each attribute.
|
239
|
+
# @param [Object] other_object to be compared
|
240
|
+
def ==(other_object)
|
241
|
+
return true if self.equal?(other_object)
|
242
|
+
self.class == other_object.class &&
|
243
|
+
apply_lag == other_object.apply_lag &&
|
244
|
+
apply_rate == other_object.apply_rate &&
|
245
|
+
database_id == other_object.database_id &&
|
246
|
+
id == other_object.id &&
|
247
|
+
lifecycle_details == other_object.lifecycle_details &&
|
248
|
+
lifecycle_state == other_object.lifecycle_state &&
|
249
|
+
peer_data_guard_association_id == other_object.peer_data_guard_association_id &&
|
250
|
+
peer_database_id == other_object.peer_database_id &&
|
251
|
+
peer_db_home_id == other_object.peer_db_home_id &&
|
252
|
+
peer_db_system_id == other_object.peer_db_system_id &&
|
253
|
+
peer_role == other_object.peer_role &&
|
254
|
+
protection_mode == other_object.protection_mode &&
|
255
|
+
role == other_object.role &&
|
256
|
+
time_created == other_object.time_created &&
|
257
|
+
transport_type == other_object.transport_type
|
258
|
+
end
|
259
|
+
|
260
|
+
# @see the `==` method
|
261
|
+
# @param [Object] other_object to be compared
|
262
|
+
def eql?(other_object)
|
263
|
+
self == other_object
|
264
|
+
end
|
265
|
+
|
266
|
+
# Calculates hash code according to all attributes.
|
267
|
+
# @return [Fixnum] Hash code
|
268
|
+
def hash
|
269
|
+
[apply_lag, apply_rate, database_id, id, lifecycle_details, lifecycle_state, peer_data_guard_association_id, peer_database_id, peer_db_home_id, peer_db_system_id, peer_role, protection_mode, role, time_created, transport_type].hash
|
270
|
+
end
|
271
|
+
|
272
|
+
# Builds the object from hash
|
273
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
274
|
+
# @return [Object] Returns the model itself
|
275
|
+
def build_from_hash(attributes)
|
276
|
+
return nil unless attributes.is_a?(Hash)
|
277
|
+
self.class.swagger_types.each_pair do |key, type|
|
278
|
+
if type =~ /^Array<(.*)>/i
|
279
|
+
# check to ensure the input is an array given that the the attribute
|
280
|
+
# is documented as an array but the input is not
|
281
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
282
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
283
|
+
end
|
284
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
285
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
286
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
287
|
+
end
|
288
|
+
|
289
|
+
self
|
290
|
+
end
|
291
|
+
|
292
|
+
# Returns the string representation of the object
|
293
|
+
# @return [String] String presentation of the object
|
294
|
+
def to_s
|
295
|
+
to_hash.to_s
|
296
|
+
end
|
297
|
+
|
298
|
+
# Returns the object in the form of hash
|
299
|
+
# @return [Hash] Returns the object in the form of hash
|
300
|
+
def to_hash
|
301
|
+
hash = {}
|
302
|
+
self.class.attribute_map.each_pair do |attr, param|
|
303
|
+
value = self.send(attr)
|
304
|
+
next if value.nil?
|
305
|
+
hash[param] = _to_hash(value)
|
306
|
+
end
|
307
|
+
hash
|
308
|
+
end
|
309
|
+
|
310
|
+
private
|
311
|
+
|
312
|
+
# Outputs non-array value in the form of hash
|
313
|
+
# For object, use to_hash. Otherwise, just return the value
|
314
|
+
# @param [Object] value Any valid value
|
315
|
+
# @return [Hash] Returns the value in the form of hash
|
316
|
+
def _to_hash(value)
|
317
|
+
if value.is_a?(Array)
|
318
|
+
value.compact.map{ |v| _to_hash(v) }
|
319
|
+
elsif value.is_a?(Hash)
|
320
|
+
{}.tap do |hash|
|
321
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
322
|
+
end
|
323
|
+
elsif value.respond_to? :to_hash
|
324
|
+
value.to_hash
|
325
|
+
else
|
326
|
+
value
|
327
|
+
end
|
328
|
+
end
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
333
|
+
def self.attribute_map
|
334
|
+
{
|
335
|
+
:'apply_lag' => :'applyLag',
|
336
|
+
:'apply_rate' => :'applyRate',
|
337
|
+
:'database_id' => :'databaseId',
|
338
|
+
:'id' => :'id',
|
339
|
+
:'lifecycle_details' => :'lifecycleDetails',
|
340
|
+
:'lifecycle_state' => :'lifecycleState',
|
341
|
+
:'peer_data_guard_association_id' => :'peerDataGuardAssociationId',
|
342
|
+
:'peer_database_id' => :'peerDatabaseId',
|
343
|
+
:'peer_db_home_id' => :'peerDbHomeId',
|
344
|
+
:'peer_db_system_id' => :'peerDbSystemId',
|
345
|
+
:'peer_role' => :'peerRole',
|
346
|
+
:'protection_mode' => :'protectionMode',
|
347
|
+
:'role' => :'role',
|
348
|
+
:'time_created' => :'timeCreated',
|
349
|
+
:'transport_type' => :'transportType'
|
350
|
+
}
|
351
|
+
end
|
352
|
+
|
353
|
+
# Attribute type mapping.
|
354
|
+
def self.swagger_types
|
355
|
+
{
|
356
|
+
:'apply_lag' => :'String',
|
357
|
+
:'apply_rate' => :'String',
|
358
|
+
:'database_id' => :'String',
|
359
|
+
:'id' => :'String',
|
360
|
+
:'lifecycle_details' => :'String',
|
361
|
+
:'lifecycle_state' => :'String',
|
362
|
+
:'peer_data_guard_association_id' => :'String',
|
363
|
+
:'peer_database_id' => :'String',
|
364
|
+
:'peer_db_home_id' => :'String',
|
365
|
+
:'peer_db_system_id' => :'String',
|
366
|
+
:'peer_role' => :'String',
|
367
|
+
:'protection_mode' => :'String',
|
368
|
+
:'role' => :'String',
|
369
|
+
:'time_created' => :'DateTime',
|
370
|
+
:'transport_type' => :'String'
|
371
|
+
}
|
372
|
+
end
|
373
|
+
end
|
374
|
+
end
|