# 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.Connectors.V1.Model.SslConfigTemplate do
  @moduledoc """
  Ssl config details of a connector version

  ## Attributes

  *   `additionalVariables` (*type:* `list(GoogleApi.Connectors.V1.Model.ConfigVariableTemplate.t)`, *default:* `nil`) - Any additional fields that need to be rendered
  *   `clientCertType` (*type:* `list(String.t)`, *default:* `nil`) - List of supported Client Cert Types
  *   `isTlsMandatory` (*type:* `boolean()`, *default:* `nil`) - Boolean for determining if the connector version mandates TLS.
  *   `serverCertType` (*type:* `list(String.t)`, *default:* `nil`) - List of supported Server Cert Types
  *   `sslType` (*type:* `String.t`, *default:* `nil`) - Controls the ssl type for the given connector version
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :additionalVariables =>
            list(GoogleApi.Connectors.V1.Model.ConfigVariableTemplate.t()) | nil,
          :clientCertType => list(String.t()) | nil,
          :isTlsMandatory => boolean() | nil,
          :serverCertType => list(String.t()) | nil,
          :sslType => String.t() | nil
        }

  field(:additionalVariables,
    as: GoogleApi.Connectors.V1.Model.ConfigVariableTemplate,
    type: :list
  )

  field(:clientCertType, type: :list)
  field(:isTlsMandatory)
  field(:serverCertType, type: :list)
  field(:sslType)
end

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

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