Class: OCI::DatabaseManagement::Models::ExternalMySqlDatabaseSummary
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::ExternalMySqlDatabaseSummary
- Defined in:
- lib/oci/database_management/models/external_my_sql_database_summary.rb
Overview
External database summary record.
Constant Summary collapse
- DEPLOYMENT_TYPE_ENUM =
[ DEPLOYMENT_TYPE_ONPREMISE = 'ONPREMISE'.freeze, DEPLOYMENT_TYPE_MDS = 'MDS'.freeze, DEPLOYMENT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- MANAGEMENT_STATE_ENUM =
[ MANAGEMENT_STATE_ENABLED = 'ENABLED'.freeze, MANAGEMENT_STATE_DISABLED = 'DISABLED'.freeze, MANAGEMENT_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
[Required] OCID of compartment for the External MySQL Database.
-
#connector_id ⇒ String
The OCID of the enabled MySQL Database Connector.
-
#db_name ⇒ String
[Required] Display name of the External MySQL Database.
-
#deployment_type ⇒ String
The deployment type of the Mysql Database.
-
#external_database_id ⇒ String
OCID of External MySQL Database.
-
#lifecycle_state ⇒ String
Indicates lifecycle state of the resource.
-
#management_state ⇒ String
Indicates database management state.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource.
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 = {}) ⇒ ExternalMySqlDatabaseSummary
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 = {}) ⇒ ExternalMySqlDatabaseSummary
Initializes the object
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 |
# File 'lib/oci/database_management/models/external_my_sql_database_summary.rb', line 117 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.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.external_database_id = attributes[:'externalDatabaseId'] if attributes[:'externalDatabaseId'] raise 'You cannot provide both :externalDatabaseId and :external_database_id' if attributes.key?(:'externalDatabaseId') && attributes.key?(:'external_database_id') self.external_database_id = attributes[:'external_database_id'] if attributes[:'external_database_id'] self.connector_id = attributes[:'connectorId'] if attributes[:'connectorId'] raise 'You cannot provide both :connectorId and :connector_id' if attributes.key?(:'connectorId') && attributes.key?(:'connector_id') self.connector_id = attributes[:'connector_id'] if attributes[:'connector_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.deployment_type = attributes[:'deploymentType'] if attributes[:'deploymentType'] raise 'You cannot provide both :deploymentType and :deployment_type' if attributes.key?(:'deploymentType') && attributes.key?(:'deployment_type') self.deployment_type = attributes[:'deployment_type'] if attributes[:'deployment_type'] self.management_state = attributes[:'managementState'] if attributes[:'managementState'] raise 'You cannot provide both :managementState and :management_state' if attributes.key?(:'managementState') && attributes.key?(:'management_state') self.management_state = attributes[:'management_state'] if attributes[:'management_state'] 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. = attributes[:'systemTags'] if attributes[:'systemTags'] raise 'You cannot provide both :systemTags and :system_tags' if attributes.key?(:'systemTags') && attributes.key?(:'system_tags') self. = attributes[:'system_tags'] if attributes[:'system_tags'] end |
Instance Attribute Details
#compartment_id ⇒ String
[Required] OCID of compartment for the External MySQL Database.
36 37 38 |
# File 'lib/oci/database_management/models/external_my_sql_database_summary.rb', line 36 def compartment_id @compartment_id end |
#connector_id ⇒ String
The OCID of the enabled MySQL Database Connector.
44 45 46 |
# File 'lib/oci/database_management/models/external_my_sql_database_summary.rb', line 44 def connector_id @connector_id end |
#db_name ⇒ String
[Required] Display name of the External MySQL Database.
48 49 50 |
# File 'lib/oci/database_management/models/external_my_sql_database_summary.rb', line 48 def db_name @db_name end |
#deployment_type ⇒ String
The deployment type of the Mysql Database.
52 53 54 |
# File 'lib/oci/database_management/models/external_my_sql_database_summary.rb', line 52 def deployment_type @deployment_type end |
#external_database_id ⇒ String
OCID of External MySQL Database.
40 41 42 |
# File 'lib/oci/database_management/models/external_my_sql_database_summary.rb', line 40 def external_database_id @external_database_id end |
#lifecycle_state ⇒ String
Indicates lifecycle state of the resource.
60 61 62 |
# File 'lib/oci/database_management/models/external_my_sql_database_summary.rb', line 60 def lifecycle_state @lifecycle_state end |
#management_state ⇒ String
Indicates database management state.
56 57 58 |
# File 'lib/oci/database_management/models/external_my_sql_database_summary.rb', line 56 def management_state @management_state end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system.
Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}
69 70 71 |
# File 'lib/oci/database_management/models/external_my_sql_database_summary.rb', line 69 def @system_tags end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/oci/database_management/models/external_my_sql_database_summary.rb', line 72 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'compartment_id': :'compartmentId', 'external_database_id': :'externalDatabaseId', 'connector_id': :'connectorId', 'db_name': :'dbName', 'deployment_type': :'deploymentType', 'management_state': :'managementState', 'lifecycle_state': :'lifecycleState', 'system_tags': :'systemTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/oci/database_management/models/external_my_sql_database_summary.rb', line 88 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'compartment_id': :'String', 'external_database_id': :'String', 'connector_id': :'String', 'db_name': :'String', 'deployment_type': :'String', 'management_state': :'String', 'lifecycle_state': :'String', 'system_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/oci/database_management/models/external_my_sql_database_summary.rb', line 218 def ==(other) return true if equal?(other) self.class == other.class && compartment_id == other.compartment_id && external_database_id == other.external_database_id && connector_id == other.connector_id && db_name == other.db_name && deployment_type == other.deployment_type && management_state == other.management_state && lifecycle_state == other.lifecycle_state && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/oci/database_management/models/external_my_sql_database_summary.rb', line 255 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
235 236 237 |
# File 'lib/oci/database_management/models/external_my_sql_database_summary.rb', line 235 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
244 245 246 |
# File 'lib/oci/database_management/models/external_my_sql_database_summary.rb', line 244 def hash [compartment_id, external_database_id, connector_id, db_name, deployment_type, management_state, lifecycle_state, ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
288 289 290 291 292 293 294 295 296 297 |
# File 'lib/oci/database_management/models/external_my_sql_database_summary.rb', line 288 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
282 283 284 |
# File 'lib/oci/database_management/models/external_my_sql_database_summary.rb', line 282 def to_s to_hash.to_s end |