Class: OCI::Dif::Models::ObjectStorageDetail
- Inherits:
-
Object
- Object
- OCI::Dif::Models::ObjectStorageDetail
- Defined in:
- lib/oci/dif/models/object_storage_detail.rb
Overview
Object Storage Details required to provision buckets.
Constant Summary collapse
- OBJECT_VERSIONING_ENUM =
[ OBJECT_VERSIONING_ENABLED = 'ENABLED'.freeze, OBJECT_VERSIONING_SUSPENDED = 'SUSPENDED'.freeze, OBJECT_VERSIONING_DISABLED = 'DISABLED'.freeze, OBJECT_VERSIONING_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- STORAGE_TIER_ENUM =
[ STORAGE_TIER_STANDARD = 'STANDARD'.freeze, STORAGE_TIER_ARCHIVE = 'ARCHIVE'.freeze, STORAGE_TIER_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- AUTO_TIERING_ENUM =
[ AUTO_TIERING_DISABLED = 'DISABLED'.freeze, AUTO_TIERING_INFREQUENTACCESS = 'INFREQUENTACCESS'.freeze, AUTO_TIERING_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#auto_tiering ⇒ String
It sets the auto-tiering status on the bucket.Allowed values are "DISABLED" / "INFREQUENTACCESS".
-
#instance_id ⇒ String
[Required] Id for Object Storage instance to be provisioned.
-
#object_versioning ⇒ String
[Required] Mentions whether the object versioning to be enabled or not,Allowed values are "ENABLED" / "DISABLED"/"SUSPENDED".
-
#storage_tier ⇒ String
[Required] Mentions which storage tier to use for the bucket,Allowed values are "STANDARD" / "ARCHIVE".
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 = {}) ⇒ ObjectStorageDetail
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 = {}) ⇒ ObjectStorageDetail
Initializes the object
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/oci/dif/models/object_storage_detail.rb', line 81 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.instance_id = attributes[:'instanceId'] if attributes[:'instanceId'] raise 'You cannot provide both :instanceId and :instance_id' if attributes.key?(:'instanceId') && attributes.key?(:'instance_id') self.instance_id = attributes[:'instance_id'] if attributes[:'instance_id'] self.object_versioning = attributes[:'objectVersioning'] if attributes[:'objectVersioning'] raise 'You cannot provide both :objectVersioning and :object_versioning' if attributes.key?(:'objectVersioning') && attributes.key?(:'object_versioning') self.object_versioning = attributes[:'object_versioning'] if attributes[:'object_versioning'] self.storage_tier = attributes[:'storageTier'] if attributes[:'storageTier'] raise 'You cannot provide both :storageTier and :storage_tier' if attributes.key?(:'storageTier') && attributes.key?(:'storage_tier') self.storage_tier = attributes[:'storage_tier'] if attributes[:'storage_tier'] self.auto_tiering = attributes[:'autoTiering'] if attributes[:'autoTiering'] raise 'You cannot provide both :autoTiering and :auto_tiering' if attributes.key?(:'autoTiering') && attributes.key?(:'auto_tiering') self.auto_tiering = attributes[:'auto_tiering'] if attributes[:'auto_tiering'] end |
Instance Attribute Details
#auto_tiering ⇒ String
It sets the auto-tiering status on the bucket.Allowed values are "DISABLED" / "INFREQUENTACCESS"
45 46 47 |
# File 'lib/oci/dif/models/object_storage_detail.rb', line 45 def auto_tiering @auto_tiering end |
#instance_id ⇒ String
[Required] Id for Object Storage instance to be provisioned.
33 34 35 |
# File 'lib/oci/dif/models/object_storage_detail.rb', line 33 def instance_id @instance_id end |
#object_versioning ⇒ String
[Required] Mentions whether the object versioning to be enabled or not,Allowed values are "ENABLED" / "DISABLED"/"SUSPENDED"
37 38 39 |
# File 'lib/oci/dif/models/object_storage_detail.rb', line 37 def object_versioning @object_versioning end |
#storage_tier ⇒ String
[Required] Mentions which storage tier to use for the bucket,Allowed values are "STANDARD" / "ARCHIVE"
41 42 43 |
# File 'lib/oci/dif/models/object_storage_detail.rb', line 41 def storage_tier @storage_tier end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/oci/dif/models/object_storage_detail.rb', line 48 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'instance_id': :'instanceId', 'object_versioning': :'objectVersioning', 'storage_tier': :'storageTier', 'auto_tiering': :'autoTiering' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
60 61 62 63 64 65 66 67 68 69 |
# File 'lib/oci/dif/models/object_storage_detail.rb', line 60 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'instance_id': :'String', 'object_versioning': :'String', 'storage_tier': :'String', 'auto_tiering': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
158 159 160 161 162 163 164 165 166 |
# File 'lib/oci/dif/models/object_storage_detail.rb', line 158 def ==(other) return true if equal?(other) self.class == other.class && instance_id == other.instance_id && object_versioning == other.object_versioning && storage_tier == other.storage_tier && auto_tiering == other.auto_tiering end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/oci/dif/models/object_storage_detail.rb', line 191 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
171 172 173 |
# File 'lib/oci/dif/models/object_storage_detail.rb', line 171 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
180 181 182 |
# File 'lib/oci/dif/models/object_storage_detail.rb', line 180 def hash [instance_id, object_versioning, storage_tier, auto_tiering].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
224 225 226 227 228 229 230 231 232 233 |
# File 'lib/oci/dif/models/object_storage_detail.rb', line 224 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
218 219 220 |
# File 'lib/oci/dif/models/object_storage_detail.rb', line 218 def to_s to_hash.to_s end |