Class: OCI::ContainerInstances::Models::ContainerOciFssVolume
- Inherits:
-
ContainerVolume
- Object
- ContainerVolume
- OCI::ContainerInstances::Models::ContainerOciFssVolume
- Defined in:
- lib/oci/container_instances/models/container_oci_fss_volume.rb
Overview
An OCI File Storage Service (FSS) File System that can be mounted to Containers within a Container Instance. Check docs.oracle.com/en-us/iaas/api/#/en/filestorage/20171215/FileSystem for more details.
Constant Summary
Constants inherited from ContainerVolume
OCI::ContainerInstances::Models::ContainerVolume::VOLUME_TYPE_ENUM
Instance Attribute Summary collapse
- #export ⇒ OCI::ContainerInstances::Models::OciFssExport
- #mount_command ⇒ OCI::ContainerInstances::Models::OciFssMountCommand
- #mount_target ⇒ OCI::ContainerInstances::Models::OciFssMountTarget
- #security ⇒ OCI::ContainerInstances::Models::OciFssSecurity
-
#subnet_id ⇒ String
Specifies the network interface to be used for the OCI File Storage Service (FSS) volume.
Attributes inherited from ContainerVolume
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 = {}) ⇒ ContainerOciFssVolume
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.
Methods inherited from ContainerVolume
Constructor Details
#initialize(attributes = {}) ⇒ ContainerOciFssVolume
Initializes the object
74 75 76 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 103 104 105 |
# File 'lib/oci/container_instances/models/container_oci_fss_volume.rb', line 74 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['volumeType'] = 'OCI_FSS_FILE_SYSTEM' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.mount_target = attributes[:'mountTarget'] if attributes[:'mountTarget'] raise 'You cannot provide both :mountTarget and :mount_target' if attributes.key?(:'mountTarget') && attributes.key?(:'mount_target') self.mount_target = attributes[:'mount_target'] if attributes[:'mount_target'] self.export = attributes[:'export'] if attributes[:'export'] self.security = attributes[:'security'] if attributes[:'security'] self.mount_command = attributes[:'mountCommand'] if attributes[:'mountCommand'] raise 'You cannot provide both :mountCommand and :mount_command' if attributes.key?(:'mountCommand') && attributes.key?(:'mount_command') self.mount_command = attributes[:'mount_command'] if attributes[:'mount_command'] self.subnet_id = attributes[:'subnetId'] if attributes[:'subnetId'] raise 'You cannot provide both :subnetId and :subnet_id' if attributes.key?(:'subnetId') && attributes.key?(:'subnet_id') self.subnet_id = attributes[:'subnet_id'] if attributes[:'subnet_id'] end |
Instance Attribute Details
#export ⇒ OCI::ContainerInstances::Models::OciFssExport
18 19 20 |
# File 'lib/oci/container_instances/models/container_oci_fss_volume.rb', line 18 def export @export end |
#mount_command ⇒ OCI::ContainerInstances::Models::OciFssMountCommand
24 25 26 |
# File 'lib/oci/container_instances/models/container_oci_fss_volume.rb', line 24 def mount_command @mount_command end |
#mount_target ⇒ OCI::ContainerInstances::Models::OciFssMountTarget
15 16 17 |
# File 'lib/oci/container_instances/models/container_oci_fss_volume.rb', line 15 def mount_target @mount_target end |
#security ⇒ OCI::ContainerInstances::Models::OciFssSecurity
21 22 23 |
# File 'lib/oci/container_instances/models/container_oci_fss_volume.rb', line 21 def security @security end |
#subnet_id ⇒ String
Specifies the network interface to be used for the OCI File Storage Service (FSS) volume. This is a required parameter when a Container Instance is attached to more than one subnets.
30 31 32 |
# File 'lib/oci/container_instances/models/container_oci_fss_volume.rb', line 30 def subnet_id @subnet_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/oci/container_instances/models/container_oci_fss_volume.rb', line 33 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'name': :'name', 'volume_type': :'volumeType', 'mount_target': :'mountTarget', 'export': :'export', 'security': :'security', 'mount_command': :'mountCommand', 'subnet_id': :'subnetId' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/oci/container_instances/models/container_oci_fss_volume.rb', line 48 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'name': :'String', 'volume_type': :'String', 'mount_target': :'OCI::ContainerInstances::Models::OciFssMountTarget', 'export': :'OCI::ContainerInstances::Models::OciFssExport', 'security': :'OCI::ContainerInstances::Models::OciFssSecurity', 'mount_command': :'OCI::ContainerInstances::Models::OciFssMountCommand', 'subnet_id': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/oci/container_instances/models/container_oci_fss_volume.rb', line 114 def ==(other) return true if equal?(other) self.class == other.class && name == other.name && volume_type == other.volume_type && mount_target == other.mount_target && export == other.export && security == other.security && mount_command == other.mount_command && subnet_id == other.subnet_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/oci/container_instances/models/container_oci_fss_volume.rb', line 150 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
130 131 132 |
# File 'lib/oci/container_instances/models/container_oci_fss_volume.rb', line 130 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
139 140 141 |
# File 'lib/oci/container_instances/models/container_oci_fss_volume.rb', line 139 def hash [name, volume_type, mount_target, export, security, mount_command, subnet_id].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
183 184 185 186 187 188 189 190 191 192 |
# File 'lib/oci/container_instances/models/container_oci_fss_volume.rb', line 183 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
177 178 179 |
# File 'lib/oci/container_instances/models/container_oci_fss_volume.rb', line 177 def to_s to_hash.to_s end |