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_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
102 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 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 102 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.
28 29 30 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 28 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.
24 25 26 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 24 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
46 47 48 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 46 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.
32 33 34 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 32 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.
50 51 52 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 50 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.
54 55 56 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 54 def outbound_connector2_id @outbound_connector2_id end |
#schema_type ⇒ String
Schema type of the LDAP account.
20 21 22 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 20 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
39 40 41 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 39 def user_search_base @user_search_base end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 57 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.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 73 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.
179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 179 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
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 216 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
196 197 198 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 196 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
205 206 207 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 205 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
249 250 251 252 253 254 255 256 257 258 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 249 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
243 244 245 |
# File 'lib/oci/file_storage/models/ldap_idmap.rb', line 243 def to_s to_hash.to_s end |