Class: OCI::Psql::Models::StorageDetails
- Inherits:
- 
      Object
      
        - Object
- OCI::Psql::Models::StorageDetails
 
- Defined in:
- lib/oci/psql/models/storage_details.rb
Overview
Storage details of the database system. This class has direct subclasses. If you are using this class as input to a service operations then you should favor using a subclass over the base class
Direct Known Subclasses
Instance Attribute Summary collapse
- 
  
    
      #availability_domain  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Specifies the availability domain of AD-local storage. 
- 
  
    
      #is_regionally_durable  ⇒ BOOLEAN 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] Specifies if the block volume used for the database system is regional or AD-local. 
- 
  
    
      #system_type  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] Type of the database system. 
Class Method Summary collapse
- 
  
    
      .attribute_map  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Attribute mapping from ruby-style variable name to JSON key. 
- 
  
    
      .get_subtype(object_hash)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype. 
- 
  
    
      .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 = {})  ⇒ StorageDetails 
    
    
  
  
  
    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 = {}) ⇒ StorageDetails
Initializes the object
| 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | # File 'lib/oci/psql/models/storage_details.rb', line 77 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.system_type = attributes[:'systemType'] if attributes[:'systemType'] raise 'You cannot provide both :systemType and :system_type' if attributes.key?(:'systemType') && attributes.key?(:'system_type') self.system_type = attributes[:'system_type'] if attributes[:'system_type'] self.is_regionally_durable = attributes[:'isRegionallyDurable'] unless attributes[:'isRegionallyDurable'].nil? self.is_regionally_durable = false if is_regionally_durable.nil? && !attributes.key?(:'isRegionallyDurable') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isRegionallyDurable and :is_regionally_durable' if attributes.key?(:'isRegionallyDurable') && attributes.key?(:'is_regionally_durable') self.is_regionally_durable = attributes[:'is_regionally_durable'] unless attributes[:'is_regionally_durable'].nil? self.is_regionally_durable = false if is_regionally_durable.nil? && !attributes.key?(:'isRegionallyDurable') && !attributes.key?(:'is_regionally_durable') # rubocop:disable Style/StringLiterals self.availability_domain = attributes[:'availabilityDomain'] if attributes[:'availabilityDomain'] raise 'You cannot provide both :availabilityDomain and :availability_domain' if attributes.key?(:'availabilityDomain') && attributes.key?(:'availability_domain') self.availability_domain = attributes[:'availability_domain'] if attributes[:'availability_domain'] end | 
Instance Attribute Details
#availability_domain ⇒ String
Specifies the availability domain of AD-local storage. If isRegionallyDurable is set to true, availabilityDomain should not be specified. If isRegionallyDurable is set to false, availabilityDomain must be specified.
| 29 30 31 | # File 'lib/oci/psql/models/storage_details.rb', line 29 def availability_domain @availability_domain end | 
#is_regionally_durable ⇒ BOOLEAN
[Required] Specifies if the block volume used for the database system is regional or AD-local. If not specified, it will be set to false. If isRegionallyDurable is set to true, availabilityDomain should not be specified. If isRegionallyDurable is set to false, availabilityDomain must be specified.
| 22 23 24 | # File 'lib/oci/psql/models/storage_details.rb', line 22 def is_regionally_durable @is_regionally_durable end | 
#system_type ⇒ String
[Required] Type of the database system.
| 14 15 16 | # File 'lib/oci/psql/models/storage_details.rb', line 14 def system_type @system_type end | 
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
| 32 33 34 35 36 37 38 39 40 | # File 'lib/oci/psql/models/storage_details.rb', line 32 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'system_type': :'systemType', 'is_regionally_durable': :'isRegionallyDurable', 'availability_domain': :'availabilityDomain' # rubocop:enable Style/SymbolLiteral } end | 
.get_subtype(object_hash) ⇒ Object
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
| 58 59 60 61 62 63 64 65 | # File 'lib/oci/psql/models/storage_details.rb', line 58 def self.get_subtype(object_hash) type = object_hash[:'systemType'] # rubocop:disable Style/SymbolLiteral return 'OCI::Psql::Models::OciOptimizedStorageDetails' if type == 'OCI_OPTIMIZED_STORAGE' # TODO: Log a warning when the subtype is not found. 'OCI::Psql::Models::StorageDetails' end | 
.swagger_types ⇒ Object
Attribute type mapping.
| 43 44 45 46 47 48 49 50 51 | # File 'lib/oci/psql/models/storage_details.rb', line 43 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'system_type': :'String', 'is_regionally_durable': :'BOOLEAN', 'availability_domain': :'String' # rubocop:enable Style/SymbolLiteral } end | 
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
| 111 112 113 114 115 116 117 118 | # File 'lib/oci/psql/models/storage_details.rb', line 111 def ==(other) return true if equal?(other) self.class == other.class && system_type == other.system_type && is_regionally_durable == other.is_regionally_durable && availability_domain == other.availability_domain end | 
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
| 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | # File 'lib/oci/psql/models/storage_details.rb', line 143 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
| 123 124 125 | # File 'lib/oci/psql/models/storage_details.rb', line 123 def eql?(other) self == other end | 
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
| 132 133 134 | # File 'lib/oci/psql/models/storage_details.rb', line 132 def hash [system_type, is_regionally_durable, availability_domain].hash end | 
#to_hash ⇒ Hash
Returns the object in the form of hash
| 176 177 178 179 180 181 182 183 184 185 | # File 'lib/oci/psql/models/storage_details.rb', line 176 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
| 170 171 172 | # File 'lib/oci/psql/models/storage_details.rb', line 170 def to_s to_hash.to_s end |