Class: OCI::FileStorage::Models::CreateExportDetails
- Inherits:
-
Object
- Object
- OCI::FileStorage::Models::CreateExportDetails
- Defined in:
- lib/oci/file_storage/models/create_export_details.rb
Overview
CreateExportDetails model.
Instance Attribute Summary collapse
-
#export_options ⇒ Array<OCI::FileStorage::Models::ClientOptions>
Export options for the new export.
-
#export_set_id ⇒ String
[Required] The OCID of this export’s export set.
-
#file_system_id ⇒ String
[Required] The OCID of this export’s file system.
-
#path ⇒ String
[Required] Path used to access the associated file system.
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 = {}) ⇒ CreateExportDetails
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 = {}) ⇒ CreateExportDetails
Initializes the object
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 111 |
# File 'lib/oci/file_storage/models/create_export_details.rb', line 86 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[:'exportOptions'] if attributes[:'exportOptions'] raise 'You cannot provide both :exportOptions and :export_options' if attributes.key?(:'exportOptions') && attributes.key?(:'export_options') self. = attributes[:'export_options'] if attributes[:'export_options'] self.export_set_id = attributes[:'exportSetId'] if attributes[:'exportSetId'] raise 'You cannot provide both :exportSetId and :export_set_id' if attributes.key?(:'exportSetId') && attributes.key?(:'export_set_id') self.export_set_id = attributes[:'export_set_id'] if attributes[:'export_set_id'] self.file_system_id = attributes[:'fileSystemId'] if attributes[:'fileSystemId'] raise 'You cannot provide both :fileSystemId and :file_system_id' if attributes.key?(:'fileSystemId') && attributes.key?(:'file_system_id') self.file_system_id = attributes[:'file_system_id'] if attributes[:'file_system_id'] self.path = attributes[:'path'] if attributes[:'path'] end |
Instance Attribute Details
#export_options ⇒ Array<OCI::FileStorage::Models::ClientOptions>
Export options for the new export. If left unspecified, defaults to:
[
{
\"source\" : \"0.0.0.0/0\",
\"requirePrivilegedSourcePort\" : false,
\"access\" : \"READ_WRITE\",
\"identitySquash\" : \"NONE\"
}
]
**Note:** Mount targets do not have Internet-routable IP
addresses. Therefore they will not be reachable from the
Internet, even if an associated `ClientOptions` item has
a source of `0.0.0.0/0`.
**If set to the empty array then the export will not be
visible to any clients.**
The export's `exportOptions` can be changed after creation
using the `UpdateExport` operation.
33 34 35 |
# File 'lib/oci/file_storage/models/create_export_details.rb', line 33 def @export_options end |
#export_set_id ⇒ String
[Required] The OCID of this export’s export set.
37 38 39 |
# File 'lib/oci/file_storage/models/create_export_details.rb', line 37 def export_set_id @export_set_id end |
#file_system_id ⇒ String
[Required] The OCID of this export’s file system.
41 42 43 |
# File 'lib/oci/file_storage/models/create_export_details.rb', line 41 def file_system_id @file_system_id end |
#path ⇒ String
[Required] Path used to access the associated file system.
Avoid entering confidential information.
Example: ‘/mediafiles`
50 51 52 |
# File 'lib/oci/file_storage/models/create_export_details.rb', line 50 def path @path end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/oci/file_storage/models/create_export_details.rb', line 53 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'export_options': :'exportOptions', 'export_set_id': :'exportSetId', 'file_system_id': :'fileSystemId', 'path': :'path' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/oci/file_storage/models/create_export_details.rb', line 65 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'export_options': :'Array<OCI::FileStorage::Models::ClientOptions>', 'export_set_id': :'String', 'file_system_id': :'String', 'path': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
120 121 122 123 124 125 126 127 |
# File 'lib/oci/file_storage/models/create_export_details.rb', line 120 def ==(other) return true if equal?(other) self.class == other.class && == other. && export_set_id == other.export_set_id && file_system_id == other.file_system_id && path == other.path end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/oci/file_storage/models/create_export_details.rb', line 152 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
132 133 134 |
# File 'lib/oci/file_storage/models/create_export_details.rb', line 132 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
141 142 143 |
# File 'lib/oci/file_storage/models/create_export_details.rb', line 141 def hash [, export_set_id, file_system_id, path].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
184 185 186 187 188 189 190 191 192 |
# File 'lib/oci/file_storage/models/create_export_details.rb', line 184 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
178 179 180 |
# File 'lib/oci/file_storage/models/create_export_details.rb', line 178 def to_s to_hash.to_s end |