# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.GKEHub.V1.Model.IdentityServiceServerConfig do
  @moduledoc """
  Server settings for the external LDAP server.

  ## Attributes

  *   `certificateAuthorityData` (*type:* `String.t`, *default:* `nil`) - Optional. Contains a Base64 encoded, PEM formatted certificate authority certificate for the LDAP server. This must be provided for the "ldaps" and "startTLS" connections.
  *   `connectionType` (*type:* `String.t`, *default:* `nil`) - Optional. Defines the connection type to communicate with the LDAP server. If `starttls` or `ldaps` is specified, the certificate_authority_data should not be empty.
  *   `host` (*type:* `String.t`, *default:* `nil`) - Required. Defines the hostname or IP of the LDAP server. Port is optional and will default to 389, if unspecified. For example, "ldap.server.example" or "10.10.10.10:389".
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :certificateAuthorityData => String.t() | nil,
          :connectionType => String.t() | nil,
          :host => String.t() | nil
        }

  field(:certificateAuthorityData)
  field(:connectionType)
  field(:host)
end

defimpl Poison.Decoder, for: GoogleApi.GKEHub.V1.Model.IdentityServiceServerConfig do
  def decode(value, options) do
    GoogleApi.GKEHub.V1.Model.IdentityServiceServerConfig.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.GKEHub.V1.Model.IdentityServiceServerConfig do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
