Class: OCI::Dblm::Models::DatabasesSummary
- Inherits:
-
Object
- Object
- OCI::Dblm::Models::DatabasesSummary
- Defined in:
- lib/oci/dblm/models/databases_summary.rb
Overview
Summary of a databases.
Constant Summary collapse
- DATABASE_TYPE_ENUM =
[ DATABASE_TYPE_SI = 'SI'.freeze, DATABASE_TYPE_RAC = 'RAC'.freeze, DATABASE_TYPE_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
-
#additional_patches ⇒ Array<OCI::Dblm::Models::AdditionalPatches>
List of additional patches on database.
-
#current_patch_watermark ⇒ String
This is the hashcode representing the list of patches applied.
-
#database_id ⇒ String
[Required] Database ocid.
-
#database_name ⇒ String
Database name.
-
#database_type ⇒ String
Database type.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
[Required] Defined tags for this resource.
-
#freeform_tags ⇒ Hash<String, String>
[Required] Simple key-value pair that is applied without any predefined name, type or scope.
-
#host_or_cluster ⇒ String
For SI, hosted on host and for RAC, host on cluster.
-
#image_details ⇒ OCI::Dblm::Models::ImageDetails
This attribute is required.
-
#lifecycle_state ⇒ String
The current state of the database.
-
#oracle_home_path ⇒ String
Path to the Oracle home.
-
#patch_activity_details ⇒ OCI::Dblm::Models::PatchActivityDetails
This attribute is required.
-
#patch_compliance_details ⇒ OCI::Dblm::Models::PatchComplianceDetails
This attribute is required.
-
#patch_user ⇒ String
Intermediate user to be used for patching, created and maintained by customers.
-
#release ⇒ String
Database release.
-
#release_full_version ⇒ String
Database release full version.
-
#sudo_file_path ⇒ String
Path to sudo binary (executable) file.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource.
-
#vulnerabilities_summary ⇒ Object
Summary of vulnerabilities found in registered resources grouped by severity.
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 = {}) ⇒ DatabasesSummary
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 = {}) ⇒ DatabasesSummary
Initializes the object
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 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 189 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.database_id = attributes[:'databaseId'] if attributes[:'databaseId'] raise 'You cannot provide both :databaseId and :database_id' if attributes.key?(:'databaseId') && attributes.key?(:'database_id') self.database_id = attributes[:'database_id'] if attributes[:'database_id'] self.database_name = attributes[:'databaseName'] if attributes[:'databaseName'] raise 'You cannot provide both :databaseName and :database_name' if attributes.key?(:'databaseName') && attributes.key?(:'database_name') self.database_name = attributes[:'database_name'] if attributes[:'database_name'] self.database_type = attributes[:'databaseType'] if attributes[:'databaseType'] raise 'You cannot provide both :databaseType and :database_type' if attributes.key?(:'databaseType') && attributes.key?(:'database_type') self.database_type = attributes[:'database_type'] if attributes[:'database_type'] self.release = attributes[:'release'] if attributes[:'release'] self.release_full_version = attributes[:'releaseFullVersion'] if attributes[:'releaseFullVersion'] raise 'You cannot provide both :releaseFullVersion and :release_full_version' if attributes.key?(:'releaseFullVersion') && attributes.key?(:'release_full_version') self.release_full_version = attributes[:'release_full_version'] if attributes[:'release_full_version'] self.oracle_home_path = attributes[:'oracleHomePath'] if attributes[:'oracleHomePath'] raise 'You cannot provide both :oracleHomePath and :oracle_home_path' if attributes.key?(:'oracleHomePath') && attributes.key?(:'oracle_home_path') self.oracle_home_path = attributes[:'oracle_home_path'] if attributes[:'oracle_home_path'] self.current_patch_watermark = attributes[:'currentPatchWatermark'] if attributes[:'currentPatchWatermark'] raise 'You cannot provide both :currentPatchWatermark and :current_patch_watermark' if attributes.key?(:'currentPatchWatermark') && attributes.key?(:'current_patch_watermark') self.current_patch_watermark = attributes[:'current_patch_watermark'] if attributes[:'current_patch_watermark'] self.host_or_cluster = attributes[:'hostOrCluster'] if attributes[:'hostOrCluster'] raise 'You cannot provide both :hostOrCluster and :host_or_cluster' if attributes.key?(:'hostOrCluster') && attributes.key?(:'host_or_cluster') self.host_or_cluster = attributes[:'host_or_cluster'] if attributes[:'host_or_cluster'] self.image_details = attributes[:'imageDetails'] if attributes[:'imageDetails'] raise 'You cannot provide both :imageDetails and :image_details' if attributes.key?(:'imageDetails') && attributes.key?(:'image_details') self.image_details = attributes[:'image_details'] if attributes[:'image_details'] self.patch_compliance_details = attributes[:'patchComplianceDetails'] if attributes[:'patchComplianceDetails'] raise 'You cannot provide both :patchComplianceDetails and :patch_compliance_details' if attributes.key?(:'patchComplianceDetails') && attributes.key?(:'patch_compliance_details') self.patch_compliance_details = attributes[:'patch_compliance_details'] if attributes[:'patch_compliance_details'] self.patch_activity_details = attributes[:'patchActivityDetails'] if attributes[:'patchActivityDetails'] raise 'You cannot provide both :patchActivityDetails and :patch_activity_details' if attributes.key?(:'patchActivityDetails') && attributes.key?(:'patch_activity_details') self.patch_activity_details = attributes[:'patch_activity_details'] if attributes[:'patch_activity_details'] self.patch_user = attributes[:'patchUser'] if attributes[:'patchUser'] raise 'You cannot provide both :patchUser and :patch_user' if attributes.key?(:'patchUser') && attributes.key?(:'patch_user') self.patch_user = attributes[:'patch_user'] if attributes[:'patch_user'] self.sudo_file_path = attributes[:'sudoFilePath'] if attributes[:'sudoFilePath'] raise 'You cannot provide both :sudoFilePath and :sudo_file_path' if attributes.key?(:'sudoFilePath') && attributes.key?(:'sudo_file_path') self.sudo_file_path = attributes[:'sudo_file_path'] if attributes[:'sudo_file_path'] self.additional_patches = attributes[:'additionalPatches'] if attributes[:'additionalPatches'] raise 'You cannot provide both :additionalPatches and :additional_patches' if attributes.key?(:'additionalPatches') && attributes.key?(:'additional_patches') self.additional_patches = attributes[:'additional_patches'] if attributes[:'additional_patches'] self.vulnerabilities_summary = attributes[:'vulnerabilitiesSummary'] if attributes[:'vulnerabilitiesSummary'] raise 'You cannot provide both :vulnerabilitiesSummary and :vulnerabilities_summary' if attributes.key?(:'vulnerabilitiesSummary') && attributes.key?(:'vulnerabilities_summary') self.vulnerabilities_summary = attributes[:'vulnerabilities_summary'] if attributes[:'vulnerabilities_summary'] 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[:'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. = 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[:'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
#additional_patches ⇒ Array<OCI::Dblm::Models::AdditionalPatches>
List of additional patches on database.
82 83 84 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 82 def additional_patches @additional_patches end |
#current_patch_watermark ⇒ String
This is the hashcode representing the list of patches applied.
54 55 56 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 54 def current_patch_watermark @current_patch_watermark end |
#database_id ⇒ String
[Required] Database ocid.
30 31 32 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 30 def database_id @database_id end |
#database_name ⇒ String
Database name.
34 35 36 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 34 def database_name @database_name end |
#database_type ⇒ String
Database type.
38 39 40 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 38 def database_type @database_type end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
[Required] Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}
102 103 104 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 102 def @defined_tags end |
#freeform_tags ⇒ Hash<String, String>
[Required] Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {\"bar-key\": \"value\"}
96 97 98 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 96 def @freeform_tags end |
#host_or_cluster ⇒ String
For SI, hosted on host and for RAC, host on cluster.
58 59 60 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 58 def host_or_cluster @host_or_cluster end |
#image_details ⇒ OCI::Dblm::Models::ImageDetails
This attribute is required.
62 63 64 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 62 def image_details @image_details end |
#lifecycle_state ⇒ String
The current state of the database.
90 91 92 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 90 def lifecycle_state @lifecycle_state end |
#oracle_home_path ⇒ String
Path to the Oracle home.
50 51 52 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 50 def oracle_home_path @oracle_home_path end |
#patch_activity_details ⇒ OCI::Dblm::Models::PatchActivityDetails
This attribute is required.
70 71 72 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 70 def patch_activity_details @patch_activity_details end |
#patch_compliance_details ⇒ OCI::Dblm::Models::PatchComplianceDetails
This attribute is required.
66 67 68 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 66 def patch_compliance_details @patch_compliance_details end |
#patch_user ⇒ String
Intermediate user to be used for patching, created and maintained by customers. This user requires sudo access to switch as Oracle home owner and root user
74 75 76 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 74 def patch_user @patch_user end |
#release ⇒ String
Database release.
42 43 44 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 42 def release @release end |
#release_full_version ⇒ String
Database release full version.
46 47 48 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 46 def release_full_version @release_full_version end |
#sudo_file_path ⇒ String
Path to sudo binary (executable) file
78 79 80 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 78 def sudo_file_path @sudo_file_path end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}
108 109 110 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 108 def @system_tags end |
#vulnerabilities_summary ⇒ Object
Summary of vulnerabilities found in registered resources grouped by severity.
86 87 88 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 86 def vulnerabilities_summary @vulnerabilities_summary end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 111 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'database_id': :'databaseId', 'database_name': :'databaseName', 'database_type': :'databaseType', 'release': :'release', 'release_full_version': :'releaseFullVersion', 'oracle_home_path': :'oracleHomePath', 'current_patch_watermark': :'currentPatchWatermark', 'host_or_cluster': :'hostOrCluster', 'image_details': :'imageDetails', 'patch_compliance_details': :'patchComplianceDetails', 'patch_activity_details': :'patchActivityDetails', 'patch_user': :'patchUser', 'sudo_file_path': :'sudoFilePath', 'additional_patches': :'additionalPatches', 'vulnerabilities_summary': :'vulnerabilitiesSummary', 'lifecycle_state': :'lifecycleState', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 138 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'database_id': :'String', 'database_name': :'String', 'database_type': :'String', 'release': :'String', 'release_full_version': :'String', 'oracle_home_path': :'String', 'current_patch_watermark': :'String', 'host_or_cluster': :'String', 'image_details': :'OCI::Dblm::Models::ImageDetails', 'patch_compliance_details': :'OCI::Dblm::Models::PatchComplianceDetails', 'patch_activity_details': :'OCI::Dblm::Models::PatchActivityDetails', 'patch_user': :'String', 'sudo_file_path': :'String', 'additional_patches': :'Array<OCI::Dblm::Models::AdditionalPatches>', 'vulnerabilities_summary': :'Object', 'lifecycle_state': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'system_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 339 def ==(other) return true if equal?(other) self.class == other.class && database_id == other.database_id && database_name == other.database_name && database_type == other.database_type && release == other.release && release_full_version == other.release_full_version && oracle_home_path == other.oracle_home_path && current_patch_watermark == other.current_patch_watermark && host_or_cluster == other.host_or_cluster && image_details == other.image_details && patch_compliance_details == other.patch_compliance_details && patch_activity_details == other.patch_activity_details && patch_user == other.patch_user && sudo_file_path == other.sudo_file_path && additional_patches == other.additional_patches && vulnerabilities_summary == other.vulnerabilities_summary && lifecycle_state == other.lifecycle_state && == other. && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 387 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
367 368 369 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 367 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
376 377 378 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 376 def hash [database_id, database_name, database_type, release, release_full_version, oracle_home_path, current_patch_watermark, host_or_cluster, image_details, patch_compliance_details, patch_activity_details, patch_user, sudo_file_path, additional_patches, vulnerabilities_summary, lifecycle_state, , , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
420 421 422 423 424 425 426 427 428 429 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 420 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
414 415 416 |
# File 'lib/oci/dblm/models/databases_summary.rb', line 414 def to_s to_hash.to_s end |