Class: OCI::IdentityDomains::Models::ExtensionPosixUser
- Inherits:
-
Object
- Object
- OCI::IdentityDomains::Models::ExtensionPosixUser
- Defined in:
- lib/oci/identity_domains/models/extension_posix_user.rb
Overview
POSIX User extension
Instance Attribute Summary collapse
-
#gecos ⇒ String
General information about the POSIX account such as their real name and phone number.
-
#gid_number ⇒ Integer
Primary Group identifier of the POSIX user.
-
#home_directory ⇒ String
The absolute path to the home directory of the POSIX account.
-
#login_shell ⇒ String
The path to the login shell of the POSIX account.
-
#uid_number ⇒ Integer
Integer uniquely identifying a user in a POSIX administrative domain.
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 = {}) ⇒ ExtensionPosixUser
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 = {}) ⇒ ExtensionPosixUser
Initializes the object
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 |
# File 'lib/oci/identity_domains/models/extension_posix_user.rb', line 113 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.uid_number = attributes[:'uidNumber'] if attributes[:'uidNumber'] raise 'You cannot provide both :uidNumber and :uid_number' if attributes.key?(:'uidNumber') && attributes.key?(:'uid_number') self.uid_number = attributes[:'uid_number'] if attributes[:'uid_number'] self.gid_number = attributes[:'gidNumber'] if attributes[:'gidNumber'] raise 'You cannot provide both :gidNumber and :gid_number' if attributes.key?(:'gidNumber') && attributes.key?(:'gid_number') self.gid_number = attributes[:'gid_number'] if attributes[:'gid_number'] self.gecos = attributes[:'gecos'] if attributes[:'gecos'] self.home_directory = attributes[:'homeDirectory'] if attributes[:'homeDirectory'] raise 'You cannot provide both :homeDirectory and :home_directory' if attributes.key?(:'homeDirectory') && attributes.key?(:'home_directory') self.home_directory = attributes[:'home_directory'] if attributes[:'home_directory'] self.login_shell = attributes[:'loginShell'] if attributes[:'loginShell'] raise 'You cannot provide both :loginShell and :login_shell' if attributes.key?(:'loginShell') && attributes.key?(:'login_shell') self.login_shell = attributes[:'login_shell'] if attributes[:'login_shell'] end |
Instance Attribute Details
#gecos ⇒ String
General information about the POSIX account such as their real name and phone number
SCIM++ Properties: - caseExact: false - multiValued: false - mutability: readWrite - required: false - returned: request - type: string - uniqueness: none
48 49 50 |
# File 'lib/oci/identity_domains/models/extension_posix_user.rb', line 48 def gecos @gecos end |
#gid_number ⇒ Integer
Primary Group identifier of the POSIX user
SCIM++ Properties: - idcsSearchable: true - multiValued: false - mutability: readWrite - required: false - returned: request - type: integer - uniqueness: none
35 36 37 |
# File 'lib/oci/identity_domains/models/extension_posix_user.rb', line 35 def gid_number @gid_number end |
#home_directory ⇒ String
The absolute path to the home directory of the POSIX account
SCIM++ Properties: - caseExact: true - multiValued: false - mutability: readWrite - required: false - returned: request - type: string - uniqueness: none
61 62 63 |
# File 'lib/oci/identity_domains/models/extension_posix_user.rb', line 61 def home_directory @home_directory end |
#login_shell ⇒ String
The path to the login shell of the POSIX account
SCIM++ Properties: - caseExact: true - multiValued: false - mutability: readWrite - required: false - returned: request - type: string - uniqueness: none
74 75 76 |
# File 'lib/oci/identity_domains/models/extension_posix_user.rb', line 74 def login_shell @login_shell end |
#uid_number ⇒ Integer
Integer uniquely identifying a user in a POSIX administrative domain
SCIM++ Properties: - idcsSearchable: true - multiValued: false - mutability: readWrite - required: false - returned: request - type: integer - uniqueness: server
22 23 24 |
# File 'lib/oci/identity_domains/models/extension_posix_user.rb', line 22 def uid_number @uid_number end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/oci/identity_domains/models/extension_posix_user.rb', line 77 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'uid_number': :'uidNumber', 'gid_number': :'gidNumber', 'gecos': :'gecos', 'home_directory': :'homeDirectory', 'login_shell': :'loginShell' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/oci/identity_domains/models/extension_posix_user.rb', line 90 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'uid_number': :'Integer', 'gid_number': :'Integer', 'gecos': :'String', 'home_directory': :'String', 'login_shell': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
153 154 155 156 157 158 159 160 161 162 |
# File 'lib/oci/identity_domains/models/extension_posix_user.rb', line 153 def ==(other) return true if equal?(other) self.class == other.class && uid_number == other.uid_number && gid_number == other.gid_number && gecos == other.gecos && home_directory == other.home_directory && login_shell == other.login_shell end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/oci/identity_domains/models/extension_posix_user.rb', line 187 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
167 168 169 |
# File 'lib/oci/identity_domains/models/extension_posix_user.rb', line 167 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
176 177 178 |
# File 'lib/oci/identity_domains/models/extension_posix_user.rb', line 176 def hash [uid_number, gid_number, gecos, home_directory, login_shell].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
220 221 222 223 224 225 226 227 228 229 |
# File 'lib/oci/identity_domains/models/extension_posix_user.rb', line 220 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
214 215 216 |
# File 'lib/oci/identity_domains/models/extension_posix_user.rb', line 214 def to_s to_hash.to_s end |