Class: OCI::FileStorage::Models::ClientOptions
- Inherits:
-
Object
- Object
- OCI::FileStorage::Models::ClientOptions
- Defined in:
- lib/oci/file_storage/models/client_options.rb
Overview
NFS export options applied to a specified set of clients. Only governs access through the associated export. Access to the same file system through a different export (on the same or different mount target) will be governed by that export’s export options.
Constant Summary collapse
- ACCESS_ENUM =
rubocop:disable Metrics/LineLength
[ ACCESS_READ_WRITE = 'READ_WRITE'.freeze, ACCESS_READ_ONLY = 'READ_ONLY'.freeze, ACCESS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- IDENTITY_SQUASH_ENUM =
[ IDENTITY_SQUASH_NONE = 'NONE'.freeze, IDENTITY_SQUASH_ROOT = 'ROOT'.freeze, IDENTITY_SQUASH_ALL = 'ALL'.freeze, IDENTITY_SQUASH_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#access ⇒ String
Type of access to grant clients using the file system through this export.
-
#anonymous_gid ⇒ Integer
GID value to remap to when squashing a client GID (see identitySquash for more details.) If unspecified defaults to ‘65534`.
-
#anonymous_uid ⇒ Integer
UID value to remap to when squashing a client UID (see identitySquash for more details.) If unspecified, defaults to ‘65534`.
-
#identity_squash ⇒ String
Used when clients accessing the file system through this export have their UID and GID remapped to ‘anonymousUid’ and ‘anonymousGid’.
-
#require_privileged_source_port ⇒ BOOLEAN
If ‘true`, clients accessing the file system through this export must connect from a privileged source port.
-
#source ⇒ String
[Required] Clients these options should apply to.
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 = {}) ⇒ ClientOptions
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 = {}) ⇒ ClientOptions
Initializes the object
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 |
# File 'lib/oci/file_storage/models/client_options.rb', line 115 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.source = attributes[:'source'] if attributes[:'source'] self.require_privileged_source_port = attributes[:'requirePrivilegedSourcePort'] unless attributes[:'requirePrivilegedSourcePort'].nil? raise 'You cannot provide both :requirePrivilegedSourcePort and :require_privileged_source_port' if attributes.key?(:'requirePrivilegedSourcePort') && attributes.key?(:'require_privileged_source_port') self.require_privileged_source_port = attributes[:'require_privileged_source_port'] unless attributes[:'require_privileged_source_port'].nil? self.access = attributes[:'access'] if attributes[:'access'] self.identity_squash = attributes[:'identitySquash'] if attributes[:'identitySquash'] raise 'You cannot provide both :identitySquash and :identity_squash' if attributes.key?(:'identitySquash') && attributes.key?(:'identity_squash') self.identity_squash = attributes[:'identity_squash'] if attributes[:'identity_squash'] self.anonymous_uid = attributes[:'anonymousUid'] if attributes[:'anonymousUid'] raise 'You cannot provide both :anonymousUid and :anonymous_uid' if attributes.key?(:'anonymousUid') && attributes.key?(:'anonymous_uid') self.anonymous_uid = attributes[:'anonymous_uid'] if attributes[:'anonymous_uid'] self.anonymous_gid = attributes[:'anonymousGid'] if attributes[:'anonymousGid'] raise 'You cannot provide both :anonymousGid and :anonymous_gid' if attributes.key?(:'anonymousGid') && attributes.key?(:'anonymous_gid') self.anonymous_gid = attributes[:'anonymous_gid'] if attributes[:'anonymous_gid'] end |
Instance Attribute Details
#access ⇒ String
Type of access to grant clients using the file system through this export. If unspecified defaults to ‘READ_ONLY`.
49 50 51 |
# File 'lib/oci/file_storage/models/client_options.rb', line 49 def access @access end |
#anonymous_gid ⇒ Integer
GID value to remap to when squashing a client GID (see identitySquash for more details.) If unspecified defaults to ‘65534`.
73 74 75 |
# File 'lib/oci/file_storage/models/client_options.rb', line 73 def anonymous_gid @anonymous_gid end |
#anonymous_uid ⇒ Integer
UID value to remap to when squashing a client UID (see identitySquash for more details.) If unspecified, defaults to ‘65534`.
66 67 68 |
# File 'lib/oci/file_storage/models/client_options.rb', line 66 def anonymous_uid @anonymous_uid end |
#identity_squash ⇒ String
Used when clients accessing the file system through this export have their UID and GID remapped to ‘anonymousUid’ and ‘anonymousGid’. If ‘ALL`, all users and groups are remapped; if `ROOT`, only the root user and group (UID/GID 0) are remapped; if `NONE`, no remapping is done. If unspecified, defaults to `ROOT`.
59 60 61 |
# File 'lib/oci/file_storage/models/client_options.rb', line 59 def identity_squash @identity_squash end |
#require_privileged_source_port ⇒ BOOLEAN
If ‘true`, clients accessing the file system through this export must connect from a privileged source port. If unspecified, defaults to `true`.
43 44 45 |
# File 'lib/oci/file_storage/models/client_options.rb', line 43 def require_privileged_source_port @require_privileged_source_port end |
#source ⇒ String
[Required] Clients these options should apply to. Must be a either single IPv4 address or single IPv4 CIDR block.
Note: Access will also be limited by any applicable VCN security rules and the ability to route IP packets to the mount target. Mount targets do not have Internet-routable IP addresses.
36 37 38 |
# File 'lib/oci/file_storage/models/client_options.rb', line 36 def source @source end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/oci/file_storage/models/client_options.rb', line 76 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'source': :'source', 'require_privileged_source_port': :'requirePrivilegedSourcePort', 'access': :'access', 'identity_squash': :'identitySquash', 'anonymous_uid': :'anonymousUid', 'anonymous_gid': :'anonymousGid' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/oci/file_storage/models/client_options.rb', line 90 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'source': :'String', 'require_privileged_source_port': :'BOOLEAN', 'access': :'String', 'identity_squash': :'String', 'anonymous_uid': :'Integer', 'anonymous_gid': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/oci/file_storage/models/client_options.rb', line 187 def ==(other) return true if equal?(other) self.class == other.class && source == other.source && require_privileged_source_port == other.require_privileged_source_port && access == other.access && identity_squash == other.identity_squash && anonymous_uid == other.anonymous_uid && anonymous_gid == other.anonymous_gid end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/oci/file_storage/models/client_options.rb', line 222 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
202 203 204 |
# File 'lib/oci/file_storage/models/client_options.rb', line 202 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
211 212 213 |
# File 'lib/oci/file_storage/models/client_options.rb', line 211 def hash [source, require_privileged_source_port, access, identity_squash, anonymous_uid, anonymous_gid].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
255 256 257 258 259 260 261 262 263 264 |
# File 'lib/oci/file_storage/models/client_options.rb', line 255 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
249 250 251 |
# File 'lib/oci/file_storage/models/client_options.rb', line 249 def to_s to_hash.to_s end |