Class: OCI::CloudBridge::Models::AwsEbsProperties
- Inherits:
-
Object
- Object
- OCI::CloudBridge::Models::AwsEbsProperties
- Defined in:
- lib/oci/cloud_bridge/models/aws_ebs_properties.rb
Overview
AWS EBS volume related properties.
Instance Attribute Summary collapse
-
#attachments ⇒ Array<OCI::CloudBridge::Models::VolumeAttachment>
Information about the volume attachments.
-
#availability_zone ⇒ String
The Availability Zone for the volume.
-
#iops ⇒ Integer
The number of I/O operations per second.
-
#is_encrypted ⇒ BOOLEAN
[Required] Indicates whether the volume is encrypted.
-
#is_multi_attach_enabled ⇒ BOOLEAN
[Required] Indicates whether Amazon EBS Multi-Attach is enabled.
-
#size_in_gi_bs ⇒ Integer
[Required] The size of the volume, in GiBs.
-
#status ⇒ String
The volume state.
-
#tags ⇒ Array<OCI::CloudBridge::Models::Tag>
Any tags assigned to the volume.
-
#throughput ⇒ Integer
The throughput that the volume supports, in MiB/s.
-
#volume_key ⇒ String
[Required] The ID of the volume.
-
#volume_type ⇒ String
[Required] The volume type.
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 = {}) ⇒ AwsEbsProperties
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 = {}) ⇒ AwsEbsProperties
Initializes the object
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 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 110 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. = attributes[:'attachments'] if attributes[:'attachments'] self.availability_zone = attributes[:'availabilityZone'] if attributes[:'availabilityZone'] raise 'You cannot provide both :availabilityZone and :availability_zone' if attributes.key?(:'availabilityZone') && attributes.key?(:'availability_zone') self.availability_zone = attributes[:'availability_zone'] if attributes[:'availability_zone'] self.is_encrypted = attributes[:'isEncrypted'] unless attributes[:'isEncrypted'].nil? raise 'You cannot provide both :isEncrypted and :is_encrypted' if attributes.key?(:'isEncrypted') && attributes.key?(:'is_encrypted') self.is_encrypted = attributes[:'is_encrypted'] unless attributes[:'is_encrypted'].nil? self.iops = attributes[:'iops'] if attributes[:'iops'] self.is_multi_attach_enabled = attributes[:'isMultiAttachEnabled'] unless attributes[:'isMultiAttachEnabled'].nil? raise 'You cannot provide both :isMultiAttachEnabled and :is_multi_attach_enabled' if attributes.key?(:'isMultiAttachEnabled') && attributes.key?(:'is_multi_attach_enabled') self.is_multi_attach_enabled = attributes[:'is_multi_attach_enabled'] unless attributes[:'is_multi_attach_enabled'].nil? self.size_in_gi_bs = attributes[:'sizeInGiBs'] if attributes[:'sizeInGiBs'] raise 'You cannot provide both :sizeInGiBs and :size_in_gi_bs' if attributes.key?(:'sizeInGiBs') && attributes.key?(:'size_in_gi_bs') self.size_in_gi_bs = attributes[:'size_in_gi_bs'] if attributes[:'size_in_gi_bs'] self.status = attributes[:'status'] if attributes[:'status'] self. = attributes[:'tags'] if attributes[:'tags'] self.throughput = attributes[:'throughput'] if attributes[:'throughput'] self.volume_key = attributes[:'volumeKey'] if attributes[:'volumeKey'] raise 'You cannot provide both :volumeKey and :volume_key' if attributes.key?(:'volumeKey') && attributes.key?(:'volume_key') self.volume_key = attributes[:'volume_key'] if attributes[:'volume_key'] self.volume_type = attributes[:'volumeType'] if attributes[:'volumeType'] raise 'You cannot provide both :volumeType and :volume_type' if attributes.key?(:'volumeType') && attributes.key?(:'volume_type') self.volume_type = attributes[:'volume_type'] if attributes[:'volume_type'] end |
Instance Attribute Details
#attachments ⇒ Array<OCI::CloudBridge::Models::VolumeAttachment>
Information about the volume attachments.
13 14 15 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 13 def @attachments end |
#availability_zone ⇒ String
The Availability Zone for the volume.
17 18 19 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 17 def availability_zone @availability_zone end |
#iops ⇒ Integer
The number of I/O operations per second.
25 26 27 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 25 def iops @iops end |
#is_encrypted ⇒ BOOLEAN
[Required] Indicates whether the volume is encrypted.
21 22 23 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 21 def is_encrypted @is_encrypted end |
#is_multi_attach_enabled ⇒ BOOLEAN
[Required] Indicates whether Amazon EBS Multi-Attach is enabled.
29 30 31 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 29 def is_multi_attach_enabled @is_multi_attach_enabled end |
#size_in_gi_bs ⇒ Integer
[Required] The size of the volume, in GiBs.
33 34 35 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 33 def size_in_gi_bs @size_in_gi_bs end |
#status ⇒ String
The volume state.
37 38 39 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 37 def status @status end |
#tags ⇒ Array<OCI::CloudBridge::Models::Tag>
Any tags assigned to the volume.
41 42 43 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 41 def @tags end |
#throughput ⇒ Integer
The throughput that the volume supports, in MiB/s.
45 46 47 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 45 def throughput @throughput end |
#volume_key ⇒ String
[Required] The ID of the volume.
49 50 51 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 49 def volume_key @volume_key end |
#volume_type ⇒ String
[Required] The volume type.
53 54 55 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 53 def volume_type @volume_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 56 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'attachments': :'attachments', 'availability_zone': :'availabilityZone', 'is_encrypted': :'isEncrypted', 'iops': :'iops', 'is_multi_attach_enabled': :'isMultiAttachEnabled', 'size_in_gi_bs': :'sizeInGiBs', 'status': :'status', 'tags': :'tags', 'throughput': :'throughput', 'volume_key': :'volumeKey', 'volume_type': :'volumeType' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 75 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'attachments': :'Array<OCI::CloudBridge::Models::VolumeAttachment>', 'availability_zone': :'String', 'is_encrypted': :'BOOLEAN', 'iops': :'Integer', 'is_multi_attach_enabled': :'BOOLEAN', 'size_in_gi_bs': :'Integer', 'status': :'String', 'tags': :'Array<OCI::CloudBridge::Models::Tag>', 'throughput': :'Integer', 'volume_key': :'String', 'volume_type': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 170 def ==(other) return true if equal?(other) self.class == other.class && == other. && availability_zone == other.availability_zone && is_encrypted == other.is_encrypted && iops == other.iops && is_multi_attach_enabled == other.is_multi_attach_enabled && size_in_gi_bs == other.size_in_gi_bs && status == other.status && == other. && throughput == other.throughput && volume_key == other.volume_key && volume_type == other.volume_type end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 210 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
190 191 192 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 190 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
199 200 201 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 199 def hash [, availability_zone, is_encrypted, iops, is_multi_attach_enabled, size_in_gi_bs, status, , throughput, volume_key, volume_type].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
243 244 245 246 247 248 249 250 251 252 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 243 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
237 238 239 |
# File 'lib/oci/cloud_bridge/models/aws_ebs_properties.rb', line 237 def to_s to_hash.to_s end |