lib/google_api/datastream/v1/model/mysql_ssl_config.ex

# 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.Datastream.V1.Model.MysqlSslConfig do
  @moduledoc """
  MySQL SSL configuration information.

  ## Attributes

  *   `caCertificate` (*type:* `String.t`, *default:* `nil`) - Input only. PEM-encoded certificate of the CA that signed the source database server's certificate.
  *   `caCertificateSet` (*type:* `boolean()`, *default:* `nil`) - Output only. Indicates whether the ca_certificate field is set.
  *   `clientCertificate` (*type:* `String.t`, *default:* `nil`) - Input only. PEM-encoded certificate that will be used by the replica to authenticate against the source database server. If this field is used then the 'client_key' and the 'ca_certificate' fields are mandatory.
  *   `clientCertificateSet` (*type:* `boolean()`, *default:* `nil`) - Output only. Indicates whether the client_certificate field is set.
  *   `clientKey` (*type:* `String.t`, *default:* `nil`) - Input only. PEM-encoded private key associated with the Client Certificate. If this field is used then the 'client_certificate' and the 'ca_certificate' fields are mandatory.
  *   `clientKeySet` (*type:* `boolean()`, *default:* `nil`) - Output only. Indicates whether the client_key field is set.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :caCertificate => String.t() | nil,
          :caCertificateSet => boolean() | nil,
          :clientCertificate => String.t() | nil,
          :clientCertificateSet => boolean() | nil,
          :clientKey => String.t() | nil,
          :clientKeySet => boolean() | nil
        }

  field(:caCertificate)
  field(:caCertificateSet)
  field(:clientCertificate)
  field(:clientCertificateSet)
  field(:clientKey)
  field(:clientKeySet)
end

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

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