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 =
[LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING', LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE', LIFECYCLE_STATE_UPDATING = 'UPDATING', LIFECYCLE_STATE_BACKUP_IN_PROGRESS = 'BACKUP_IN_PROGRESS', LIFECYCLE_STATE_TERMINATING = 'TERMINATING', LIFECYCLE_STATE_TERMINATED = 'TERMINATED', LIFECYCLE_STATE_RESTORE_FAILED = 'RESTORE_FAILED', LIFECYCLE_STATE_FAILED = 'FAILED', LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
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.
-
#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.
Instance Method Summary collapse
-
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other_object) ⇒ 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
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 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 |
# File 'lib/oci/database/models/database_summary.rb', line 90 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} if attributes[:'characterSet'] self.character_set = attributes[:'characterSet'] end raise 'You cannot provide both :characterSet and :character_set' if attributes.key?(:'characterSet') && attributes.key?(:'character_set') if attributes[:'character_set'] self.character_set = attributes[:'character_set'] end if attributes[:'compartmentId'] self.compartment_id = attributes[:'compartmentId'] end raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') if attributes[:'compartment_id'] self.compartment_id = attributes[:'compartment_id'] end if attributes[:'dbBackupConfig'] self.db_backup_config = attributes[:'dbBackupConfig'] end raise 'You cannot provide both :dbBackupConfig and :db_backup_config' if attributes.key?(:'dbBackupConfig') && attributes.key?(:'db_backup_config') if attributes[:'db_backup_config'] self.db_backup_config = attributes[:'db_backup_config'] end if attributes[:'dbHomeId'] self.db_home_id = attributes[:'dbHomeId'] end raise 'You cannot provide both :dbHomeId and :db_home_id' if attributes.key?(:'dbHomeId') && attributes.key?(:'db_home_id') if attributes[:'db_home_id'] self.db_home_id = attributes[:'db_home_id'] end if attributes[:'dbName'] self.db_name = attributes[:'dbName'] end raise 'You cannot provide both :dbName and :db_name' if attributes.key?(:'dbName') && attributes.key?(:'db_name') if attributes[:'db_name'] self.db_name = attributes[:'db_name'] end if attributes[:'dbUniqueName'] self.db_unique_name = attributes[:'dbUniqueName'] end raise 'You cannot provide both :dbUniqueName and :db_unique_name' if attributes.key?(:'dbUniqueName') && attributes.key?(:'db_unique_name') if attributes[:'db_unique_name'] self.db_unique_name = attributes[:'db_unique_name'] end if attributes[:'dbWorkload'] self.db_workload = attributes[:'dbWorkload'] end raise 'You cannot provide both :dbWorkload and :db_workload' if attributes.key?(:'dbWorkload') && attributes.key?(:'db_workload') if attributes[:'db_workload'] self.db_workload = attributes[:'db_workload'] end if attributes[:'id'] self.id = attributes[:'id'] end if attributes[:'lifecycleDetails'] self.lifecycle_details = attributes[:'lifecycleDetails'] end raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details') if attributes[:'lifecycle_details'] self.lifecycle_details = attributes[:'lifecycle_details'] end if attributes[:'lifecycleState'] self.lifecycle_state = attributes[:'lifecycleState'] end raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') if attributes[:'lifecycle_state'] self.lifecycle_state = attributes[:'lifecycle_state'] end if attributes[:'ncharacterSet'] self.ncharacter_set = attributes[:'ncharacterSet'] end raise 'You cannot provide both :ncharacterSet and :ncharacter_set' if attributes.key?(:'ncharacterSet') && attributes.key?(:'ncharacter_set') if attributes[:'ncharacter_set'] self.ncharacter_set = attributes[:'ncharacter_set'] end if attributes[:'pdbName'] self.pdb_name = attributes[:'pdbName'] end raise 'You cannot provide both :pdbName and :pdb_name' if attributes.key?(:'pdbName') && attributes.key?(:'pdb_name') if attributes[:'pdb_name'] self.pdb_name = attributes[:'pdb_name'] end if attributes[:'timeCreated'] self.time_created = attributes[:'timeCreated'] end raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') if attributes[:'time_created'] self.time_created = attributes[:'time_created'] end end |
Instance Attribute Details
#character_set ⇒ String
The character set for the database.
24 25 26 |
# File 'lib/oci/database/models/database_summary.rb', line 24 def character_set @character_set end |
#compartment_id ⇒ String
[Required] The OCID of the compartment.
28 29 30 |
# File 'lib/oci/database/models/database_summary.rb', line 28 def compartment_id @compartment_id end |
#db_backup_config ⇒ OCI::Database::Models::DbBackupConfig
31 32 33 |
# File 'lib/oci/database/models/database_summary.rb', line 31 def db_backup_config @db_backup_config end |
#db_home_id ⇒ String
The OCID of the database home.
35 36 37 |
# File 'lib/oci/database/models/database_summary.rb', line 35 def db_home_id @db_home_id end |
#db_name ⇒ String
[Required] The database name.
39 40 41 |
# File 'lib/oci/database/models/database_summary.rb', line 39 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.
44 45 46 |
# File 'lib/oci/database/models/database_summary.rb', line 44 def db_unique_name @db_unique_name end |
#db_workload ⇒ String
Database workload type.
48 49 50 |
# File 'lib/oci/database/models/database_summary.rb', line 48 def db_workload @db_workload end |
#id ⇒ String
[Required] The OCID of the database.
52 53 54 |
# File 'lib/oci/database/models/database_summary.rb', line 52 def id @id end |
#lifecycle_details ⇒ String
Additional information about the current lifecycleState.
56 57 58 |
# File 'lib/oci/database/models/database_summary.rb', line 56 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the database.
60 61 62 |
# File 'lib/oci/database/models/database_summary.rb', line 60 def lifecycle_state @lifecycle_state end |
#ncharacter_set ⇒ String
The national character set for the database.
64 65 66 |
# File 'lib/oci/database/models/database_summary.rb', line 64 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.
68 69 70 |
# File 'lib/oci/database/models/database_summary.rb', line 68 def pdb_name @pdb_name end |
#time_created ⇒ DateTime
The date and time the database was created.
72 73 74 |
# File 'lib/oci/database/models/database_summary.rb', line 72 def time_created @time_created end |
Instance Method Details
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/oci/database/models/database_summary.rb', line 234 def ==(other_object) return true if self.equal?(other_object) self.class == other_object.class && character_set == other_object.character_set && compartment_id == other_object.compartment_id && db_backup_config == other_object.db_backup_config && db_home_id == other_object.db_home_id && db_name == other_object.db_name && db_unique_name == other_object.db_unique_name && db_workload == other_object.db_workload && id == other_object.id && lifecycle_details == other_object.lifecycle_details && lifecycle_state == other_object.lifecycle_state && ncharacter_set == other_object.ncharacter_set && pdb_name == other_object.pdb_name && time_created == other_object.time_created end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/oci/database/models/database_summary.rb', line 267 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) self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.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_object) ⇒ Boolean
254 255 256 |
# File 'lib/oci/database/models/database_summary.rb', line 254 def eql?(other_object) self == other_object end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
260 261 262 |
# File 'lib/oci/database/models/database_summary.rb', line 260 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
292 293 294 295 296 297 298 299 300 |
# File 'lib/oci/database/models/database_summary.rb', line 292 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
286 287 288 |
# File 'lib/oci/database/models/database_summary.rb', line 286 def to_s to_hash.to_s end |