class Comet::ExternalLDAPAuthenticationSourceSettings
ExternalLDAPAuthenticationSourceSettings
is a typed class wrapper around the underlying Comet
Server API data structure.
Attributes
accept_invalid_ssl[RW]
@type [Boolean] accept_invalid_ssl
bind_password[RW]
@type [String] bind_password
bind_user[RW]
@type [String] bind_user
hostname[RW]
@type [String] hostname
port[RW]
@type [Number] port
search_dn[RW]
@type [String] search_dn
search_filter[RW]
@type [String] search_filter
security_method[RW]
@type [String] security_method
unknown_json_fields[RW]
@type [Hash] Hidden storage to preserve future properties for non-destructive roundtrip operations
Public Class Methods
new()
click to toggle source
# File lib/comet/models/external_ldapauthentication_source_settings.rb, line 44 def initialize clear end
Public Instance Methods
clear()
click to toggle source
# File lib/comet/models/external_ldapauthentication_source_settings.rb, line 48 def clear @hostname = '' @port = 0 @security_method = '' @bind_user = '' @bind_password = '' @search_dn = '' @search_filter = '' @unknown_json_fields = {} end
from_hash(obj)
click to toggle source
@param [Hash] obj The complete object as a Ruby hash
# File lib/comet/models/external_ldapauthentication_source_settings.rb, line 67 def from_hash(obj) raise TypeError, "'obj' expected Hash, got #{obj.class}" unless obj.is_a? Hash obj.each do |k, v| case k when 'Hostname' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @hostname = v when 'Port' raise TypeError, "'v' expected Numeric, got #{v.class}" unless v.is_a? Numeric @port = v when 'SecurityMethod' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @security_method = v when 'BindUser' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @bind_user = v when 'BindPassword' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @bind_password = v when 'SearchDN' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @search_dn = v when 'SearchFilter' raise TypeError, "'v' expected String, got #{v.class}" unless v.is_a? String @search_filter = v when 'AcceptInvalidSSL' @accept_invalid_ssl = v else @unknown_json_fields[k] = v end end end
from_json(json_string)
click to toggle source
@param [String] json_string The complete object in JSON format
# File lib/comet/models/external_ldapauthentication_source_settings.rb, line 60 def from_json(json_string) raise TypeError, "'json_string' expected String, got #{json_string.class}" unless json_string.is_a? String from_hash(JSON.parse(json_string)) end
to_h()
click to toggle source
@return [Hash] The complete object as a Ruby hash
# File lib/comet/models/external_ldapauthentication_source_settings.rb, line 126 def to_h to_hash end
to_hash()
click to toggle source
@return [Hash] The complete object as a Ruby hash
# File lib/comet/models/external_ldapauthentication_source_settings.rb, line 109 def to_hash ret = {} ret['Hostname'] = @hostname ret['Port'] = @port ret['SecurityMethod'] = @security_method ret['BindUser'] = @bind_user ret['BindPassword'] = @bind_password ret['SearchDN'] = @search_dn ret['SearchFilter'] = @search_filter ret['AcceptInvalidSSL'] = @accept_invalid_ssl @unknown_json_fields.each do |k, v| ret[k] = v end ret end
to_json(options = {})
click to toggle source
@return [String] The complete object as a JSON string
# File lib/comet/models/external_ldapauthentication_source_settings.rb, line 131 def to_json(options = {}) to_hash.to_json(options) end