Class: OCI::FileStorage::Models::LdapIdmap
- Inherits:
-
Object
- Object
- OCI::FileStorage::Models::LdapIdmap
- Defined in:
- lib/oci/file_storage/models/ldap_idmap.rb
Overview
Mount target details about the LDAP ID mapping configuration.
Constant Summary collapse
- SCHEMA_TYPE_ENUM =
[ SCHEMA_TYPE_RFC2307 = 'RFC2307'.freeze, SCHEMA_TYPE_RFC2307_BIS = 'RFC2307BIS'.freeze, SCHEMA_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#cache_lifetime_seconds ⇒ Integer
The maximum amount of time the mount target is allowed to use a cached entry.
-
#cache_refresh_interval_seconds ⇒ Integer
The amount of time that the mount target should allow an entry to persist in its cache before attempting to refresh the entry.
-
#group_search_base ⇒ String
All LDAP searches are recursive starting at this group.
-
#negative_cache_lifetime_seconds ⇒ Integer
The amount of time that a mount target will maintain information that a user is not found in the ID mapping configuration.
-
#outbound_connector1_id ⇒ String
The OCID of the first connector to use to communicate with the LDAP server.
-
#outbound_connector2_id ⇒ String
The OCID of the second connector to use to communicate with the LDAP server.
-
#schema_type ⇒ String
Schema type of the LDAP account.
-
#user_search_base ⇒ String
All LDAP searches are recursive starting at this user.
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 = {}) ⇒ LdapIdmap
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 = {}) ⇒ LdapIdmap
Initializes the object
103 104 105 106 107 108 109 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 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 103 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.schema_type = attributes[:'schemaType'] if attributes[:'schemaType'] self.schema_type = "RFC2307" if schema_type.nil? && !attributes.key?(:'schemaType') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :schemaType and :schema_type' if attributes.key?(:'schemaType') && attributes.key?(:'schema_type') self.schema_type = attributes[:'schema_type'] if attributes[:'schema_type'] self.schema_type = "RFC2307" if schema_type.nil? && !attributes.key?(:'schemaType') && !attributes.key?(:'schema_type') # rubocop:disable Style/StringLiterals self.cache_refresh_interval_seconds = attributes[:'cacheRefreshIntervalSeconds'] if attributes[:'cacheRefreshIntervalSeconds'] raise 'You cannot provide both :cacheRefreshIntervalSeconds and :cache_refresh_interval_seconds' if attributes.key?(:'cacheRefreshIntervalSeconds') && attributes.key?(:'cache_refresh_interval_seconds') self.cache_refresh_interval_seconds = attributes[:'cache_refresh_interval_seconds'] if attributes[:'cache_refresh_interval_seconds'] self.cache_lifetime_seconds = attributes[:'cacheLifetimeSeconds'] if attributes[:'cacheLifetimeSeconds'] raise 'You cannot provide both :cacheLifetimeSeconds and :cache_lifetime_seconds' if attributes.key?(:'cacheLifetimeSeconds') && attributes.key?(:'cache_lifetime_seconds') self.cache_lifetime_seconds = attributes[:'cache_lifetime_seconds'] if attributes[:'cache_lifetime_seconds'] self.negative_cache_lifetime_seconds = attributes[:'negativeCacheLifetimeSeconds'] if attributes[:'negativeCacheLifetimeSeconds'] raise 'You cannot provide both :negativeCacheLifetimeSeconds and :negative_cache_lifetime_seconds' if attributes.key?(:'negativeCacheLifetimeSeconds') && attributes.key?(:'negative_cache_lifetime_seconds') self.negative_cache_lifetime_seconds = attributes[:'negative_cache_lifetime_seconds'] if attributes[:'negative_cache_lifetime_seconds'] self.user_search_base = attributes[:'userSearchBase'] if attributes[:'userSearchBase'] raise 'You cannot provide both :userSearchBase and :user_search_base' if attributes.key?(:'userSearchBase') && attributes.key?(:'user_search_base') self.user_search_base = attributes[:'user_search_base'] if attributes[:'user_search_base'] self.group_search_base = attributes[:'groupSearchBase'] if attributes[:'groupSearchBase'] raise 'You cannot provide both :groupSearchBase and :group_search_base' if attributes.key?(:'groupSearchBase') && attributes.key?(:'group_search_base') self.group_search_base = attributes[:'group_search_base'] if attributes[:'group_search_base'] self.outbound_connector1_id = attributes[:'outboundConnector1Id'] if attributes[:'outboundConnector1Id'] raise 'You cannot provide both :outboundConnector1Id and :outbound_connector1_id' if attributes.key?(:'outboundConnector1Id') && attributes.key?(:'outbound_connector1_id') self.outbound_connector1_id = attributes[:'outbound_connector1_id'] if attributes[:'outbound_connector1_id'] self.outbound_connector2_id = attributes[:'outboundConnector2Id'] if attributes[:'outboundConnector2Id'] raise 'You cannot provide both :outboundConnector2Id and :outbound_connector2_id' if attributes.key?(:'outboundConnector2Id') && attributes.key?(:'outbound_connector2_id') self.outbound_connector2_id = attributes[:'outbound_connector2_id'] if attributes[:'outbound_connector2_id'] end |
Instance Attribute Details
#cache_lifetime_seconds ⇒ Integer
The maximum amount of time the mount target is allowed to use a cached entry.
29 30 31 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 29 def cache_lifetime_seconds @cache_lifetime_seconds end |
#cache_refresh_interval_seconds ⇒ Integer
The amount of time that the mount target should allow an entry to persist in its cache before attempting to refresh the entry.
25 26 27 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 25 def cache_refresh_interval_seconds @cache_refresh_interval_seconds end |
#group_search_base ⇒ String
All LDAP searches are recursive starting at this group.
Example: CN=Group,DC=domain,DC=com
47 48 49 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 47 def group_search_base @group_search_base end |
#negative_cache_lifetime_seconds ⇒ Integer
The amount of time that a mount target will maintain information that a user is not found in the ID mapping configuration.
33 34 35 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 33 def negative_cache_lifetime_seconds @negative_cache_lifetime_seconds end |
#outbound_connector1_id ⇒ String
The OCID of the first connector to use to communicate with the LDAP server.
51 52 53 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 51 def outbound_connector1_id @outbound_connector1_id end |
#outbound_connector2_id ⇒ String
The OCID of the second connector to use to communicate with the LDAP server.
55 56 57 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 55 def outbound_connector2_id @outbound_connector2_id end |
#schema_type ⇒ String
Schema type of the LDAP account.
21 22 23 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 21 def schema_type @schema_type end |
#user_search_base ⇒ String
All LDAP searches are recursive starting at this user.
Example: CN=User,DC=domain,DC=com
40 41 42 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 40 def user_search_base @user_search_base end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 58 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'schema_type': :'schemaType', 'cache_refresh_interval_seconds': :'cacheRefreshIntervalSeconds', 'cache_lifetime_seconds': :'cacheLifetimeSeconds', 'negative_cache_lifetime_seconds': :'negativeCacheLifetimeSeconds', 'user_search_base': :'userSearchBase', 'group_search_base': :'groupSearchBase', 'outbound_connector1_id': :'outboundConnector1Id', 'outbound_connector2_id': :'outboundConnector2Id' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 74 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'schema_type': :'String', 'cache_refresh_interval_seconds': :'Integer', 'cache_lifetime_seconds': :'Integer', 'negative_cache_lifetime_seconds': :'Integer', 'user_search_base': :'String', 'group_search_base': :'String', 'outbound_connector1_id': :'String', 'outbound_connector2_id': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 180 def ==(other) return true if equal?(other) self.class == other.class && schema_type == other.schema_type && cache_refresh_interval_seconds == other.cache_refresh_interval_seconds && cache_lifetime_seconds == other.cache_lifetime_seconds && negative_cache_lifetime_seconds == other.negative_cache_lifetime_seconds && user_search_base == other.user_search_base && group_search_base == other.group_search_base && outbound_connector1_id == other.outbound_connector1_id && outbound_connector2_id == other.outbound_connector2_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 217 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
197 198 199 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 197 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
206 207 208 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 206 def hash [schema_type, cache_refresh_interval_seconds, cache_lifetime_seconds, negative_cache_lifetime_seconds, user_search_base, group_search_base, outbound_connector1_id, outbound_connector2_id].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
250 251 252 253 254 255 256 257 258 259 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 250 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
244 245 246 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 244 def to_s to_hash.to_s end |