Method: Harbor2Client::LdapConf#initialize

Defined in:
lib/harbor2_client/models/ldap_conf.rb

#initialize(attributes = {}) ⇒ LdapConf

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/harbor2_client/models/ldap_conf.rb', line 77

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 }

  if attributes.has_key?(:'ldap_url')
    self.ldap_url = attributes[:'ldap_url']
  end

  if attributes.has_key?(:'ldap_search_dn')
    self.ldap_search_dn = attributes[:'ldap_search_dn']
  end

  if attributes.has_key?(:'ldap_search_password')
    self.ldap_search_password = attributes[:'ldap_search_password']
  end

  if attributes.has_key?(:'ldap_base_dn')
    self.ldap_base_dn = attributes[:'ldap_base_dn']
  end

  if attributes.has_key?(:'ldap_filter')
    self.ldap_filter = attributes[:'ldap_filter']
  end

  if attributes.has_key?(:'ldap_uid')
    self.ldap_uid = attributes[:'ldap_uid']
  end

  if attributes.has_key?(:'ldap_scope')
    self.ldap_scope = attributes[:'ldap_scope']
  end

  if attributes.has_key?(:'ldap_connection_timeout')
    self.ldap_connection_timeout = attributes[:'ldap_connection_timeout']
  end

  if attributes.has_key?(:'ldap_verify_cert')
    self.ldap_verify_cert = attributes[:'ldap_verify_cert']
  end
end