Class: OCI::Database::Models::DatabaseSummary
- Inherits:
-
Object
- Object
- OCI::Database::Models::DatabaseSummary
- Defined in:
- lib/oci/database/models/database_summary.rb
Overview
An Oracle database on a DB System. For more information, see [Managing Oracle Databases](docs.us-phoenix-1.oraclecloud.com/Content/Database/Concepts/overview.htm).
To use any of the API operations, you must be authorized in an IAM policy. If you’re not authorized, talk to an administrator. If you’re an administrator who needs to write policies to give users access, see [Getting Started with Policies](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
rubocop:disable Metrics/LineLength
[ LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING'.freeze, LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_BACKUP_IN_PROGRESS = 'BACKUP_IN_PROGRESS'.freeze, LIFECYCLE_STATE_TERMINATING = 'TERMINATING'.freeze, LIFECYCLE_STATE_TERMINATED = 'TERMINATED'.freeze, LIFECYCLE_STATE_RESTORE_FAILED = 'RESTORE_FAILED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#character_set ⇒ String
The character set for the database.
-
#compartment_id ⇒ String
[Required] The OCID of the compartment.
- #db_backup_config ⇒ OCI::Database::Models::DbBackupConfig
-
#db_home_id ⇒ String
The OCID of the database home.
-
#db_name ⇒ String
[Required] The database name.
-
#db_unique_name ⇒ String
[Required] A system-generated name for the database to ensure uniqueness within an Oracle Data Guard group (a primary database and its standby databases).
-
#db_workload ⇒ String
Database workload type.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#id ⇒ String
[Required] The OCID of the database.
-
#lifecycle_details ⇒ String
Additional information about the current lifecycleState.
-
#lifecycle_state ⇒ String
[Required] The current state of the database.
-
#ncharacter_set ⇒ String
The national character set for the database.
-
#pdb_name ⇒ String
Pluggable database name.
-
#time_created ⇒ DateTime
The date and time the database was created.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ DatabaseSummary
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ DatabaseSummary
Initializes the object
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/oci/database/models/database_summary.rb', line 160 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.character_set = attributes[:'characterSet'] if attributes[:'characterSet'] raise 'You cannot provide both :characterSet and :character_set' if attributes.key?(:'characterSet') && attributes.key?(:'character_set') self.character_set = attributes[:'character_set'] if attributes[:'character_set'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.db_backup_config = attributes[:'dbBackupConfig'] if attributes[:'dbBackupConfig'] raise 'You cannot provide both :dbBackupConfig and :db_backup_config' if attributes.key?(:'dbBackupConfig') && attributes.key?(:'db_backup_config') self.db_backup_config = attributes[:'db_backup_config'] if attributes[:'db_backup_config'] self.db_home_id = attributes[:'dbHomeId'] if attributes[:'dbHomeId'] raise 'You cannot provide both :dbHomeId and :db_home_id' if attributes.key?(:'dbHomeId') && attributes.key?(:'db_home_id') self.db_home_id = attributes[:'db_home_id'] if attributes[:'db_home_id'] self.db_name = attributes[:'dbName'] if attributes[:'dbName'] raise 'You cannot provide both :dbName and :db_name' if attributes.key?(:'dbName') && attributes.key?(:'db_name') self.db_name = attributes[:'db_name'] if attributes[:'db_name'] self.db_unique_name = attributes[:'dbUniqueName'] if attributes[:'dbUniqueName'] raise 'You cannot provide both :dbUniqueName and :db_unique_name' if attributes.key?(:'dbUniqueName') && attributes.key?(:'db_unique_name') self.db_unique_name = attributes[:'db_unique_name'] if attributes[:'db_unique_name'] self.db_workload = attributes[:'dbWorkload'] if attributes[:'dbWorkload'] raise 'You cannot provide both :dbWorkload and :db_workload' if attributes.key?(:'dbWorkload') && attributes.key?(:'db_workload') self.db_workload = attributes[:'db_workload'] if attributes[:'db_workload'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self.id = attributes[:'id'] if attributes[:'id'] self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails'] raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details') self.lifecycle_details = attributes[:'lifecycle_details'] if attributes[:'lifecycle_details'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.ncharacter_set = attributes[:'ncharacterSet'] if attributes[:'ncharacterSet'] raise 'You cannot provide both :ncharacterSet and :ncharacter_set' if attributes.key?(:'ncharacterSet') && attributes.key?(:'ncharacter_set') self.ncharacter_set = attributes[:'ncharacter_set'] if attributes[:'ncharacter_set'] self.pdb_name = attributes[:'pdbName'] if attributes[:'pdbName'] raise 'You cannot provide both :pdbName and :pdb_name' if attributes.key?(:'pdbName') && attributes.key?(:'pdb_name') self.pdb_name = attributes[:'pdb_name'] if attributes[:'pdb_name'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] end |
Instance Attribute Details
#character_set ⇒ String
The character set for the database.
27 28 29 |
# File 'lib/oci/database/models/database_summary.rb', line 27 def character_set @character_set end |
#compartment_id ⇒ String
[Required] The OCID of the compartment.
31 32 33 |
# File 'lib/oci/database/models/database_summary.rb', line 31 def compartment_id @compartment_id end |
#db_backup_config ⇒ OCI::Database::Models::DbBackupConfig
34 35 36 |
# File 'lib/oci/database/models/database_summary.rb', line 34 def db_backup_config @db_backup_config end |
#db_home_id ⇒ String
The OCID of the database home.
38 39 40 |
# File 'lib/oci/database/models/database_summary.rb', line 38 def db_home_id @db_home_id end |
#db_name ⇒ String
[Required] The database name.
42 43 44 |
# File 'lib/oci/database/models/database_summary.rb', line 42 def db_name @db_name end |
#db_unique_name ⇒ String
[Required] A system-generated name for the database to ensure uniqueness within an Oracle Data Guard group (a primary database and its standby databases). The unique name cannot be changed.
47 48 49 |
# File 'lib/oci/database/models/database_summary.rb', line 47 def db_unique_name @db_unique_name end |
#db_workload ⇒ String
Database workload type.
51 52 53 |
# File 'lib/oci/database/models/database_summary.rb', line 51 def db_workload @db_workload end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
Example: ‘{"CostCenter": "42"}`
59 60 61 |
# File 'lib/oci/database/models/database_summary.rb', line 59 def end |
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
Example: ‘"Finance"`
67 68 69 |
# File 'lib/oci/database/models/database_summary.rb', line 67 def end |
#id ⇒ String
[Required] The OCID of the database.
71 72 73 |
# File 'lib/oci/database/models/database_summary.rb', line 71 def id @id end |
#lifecycle_details ⇒ String
Additional information about the current lifecycleState.
75 76 77 |
# File 'lib/oci/database/models/database_summary.rb', line 75 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the database.
79 80 81 |
# File 'lib/oci/database/models/database_summary.rb', line 79 def lifecycle_state @lifecycle_state end |
#ncharacter_set ⇒ String
The national character set for the database.
83 84 85 |
# File 'lib/oci/database/models/database_summary.rb', line 83 def ncharacter_set @ncharacter_set end |
#pdb_name ⇒ String
Pluggable database name. It must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted. Pluggable database should not be same as database name.
87 88 89 |
# File 'lib/oci/database/models/database_summary.rb', line 87 def pdb_name @pdb_name end |
#time_created ⇒ DateTime
The date and time the database was created.
91 92 93 |
# File 'lib/oci/database/models/database_summary.rb', line 91 def time_created @time_created end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/oci/database/models/database_summary.rb', line 94 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'character_set': :'characterSet', 'compartment_id': :'compartmentId', 'db_backup_config': :'dbBackupConfig', 'db_home_id': :'dbHomeId', 'db_name': :'dbName', 'db_unique_name': :'dbUniqueName', 'db_workload': :'dbWorkload', 'defined_tags': :'definedTags', 'freeform_tags': :'freeformTags', 'id': :'id', 'lifecycle_details': :'lifecycleDetails', 'lifecycle_state': :'lifecycleState', 'ncharacter_set': :'ncharacterSet', 'pdb_name': :'pdbName', 'time_created': :'timeCreated' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/oci/database/models/database_summary.rb', line 117 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'character_set': :'String', 'compartment_id': :'String', 'db_backup_config': :'OCI::Database::Models::DbBackupConfig', 'db_home_id': :'String', 'db_name': :'String', 'db_unique_name': :'String', 'db_workload': :'String', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'freeform_tags': :'Hash<String, String>', 'id': :'String', 'lifecycle_details': :'String', 'lifecycle_state': :'String', 'ncharacter_set': :'String', 'pdb_name': :'String', 'time_created': :'DateTime' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/oci/database/models/database_summary.rb', line 275 def ==(other) return true if equal?(other) self.class == other.class && character_set == other.character_set && compartment_id == other.compartment_id && db_backup_config == other.db_backup_config && db_home_id == other.db_home_id && db_name == other.db_name && db_unique_name == other.db_unique_name && db_workload == other.db_workload && == other. && == other. && id == other.id && lifecycle_details == other.lifecycle_details && lifecycle_state == other.lifecycle_state && ncharacter_set == other.ncharacter_set && pdb_name == other.pdb_name && time_created == other.time_created end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 |
# File 'lib/oci/database/models/database_summary.rb', line 318 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
298 299 300 |
# File 'lib/oci/database/models/database_summary.rb', line 298 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
307 308 309 |
# File 'lib/oci/database/models/database_summary.rb', line 307 def hash [character_set, compartment_id, db_backup_config, db_home_id, db_name, db_unique_name, db_workload, , , id, lifecycle_details, lifecycle_state, ncharacter_set, pdb_name, time_created].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
350 351 352 353 354 355 356 357 358 |
# File 'lib/oci/database/models/database_summary.rb', line 350 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
344 345 346 |
# File 'lib/oci/database/models/database_summary.rb', line 344 def to_s to_hash.to_s end |