# 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.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaClientConfig do
  @moduledoc """
  The configuration information for the Client

  ## Attributes

  *   `billingType` (*type:* `String.t`, *default:* `nil`) - Indicates the billing type of the client
  *   `clientState` (*type:* `String.t`, *default:* `nil`) - Indicates the activity state the client
  *   `cloudKmsConfig` (*type:* `GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaCloudKmsConfig.t`, *default:* `nil`) - Cloud KMS config for Auth Module to encrypt/decrypt credentials.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - The timestamp when the client was first created.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Description of what the client is used for
  *   `enableHttpCall` (*type:* `boolean()`, *default:* `nil`) - Optional. Indicates the client enables making HTTP call.
  *   `enableInternalIp` (*type:* `boolean()`, *default:* `nil`) - Optional. Indicates the client enables internal IP feature, this is applicable for internal clients only.
  *   `enableVariableMasking` (*type:* `boolean()`, *default:* `nil`) - Optional. True if variable masking feature should be turned on for this region
  *   `id` (*type:* `String.t`, *default:* `nil`) - Globally unique ID (project_id + region)
  *   `isGmek` (*type:* `boolean()`, *default:* `nil`) - Optional. Indicates the client is provisioned with CMEK or GMEK.
  *   `p4ServiceAccount` (*type:* `String.t`, *default:* `nil`) - The service agent associated with this client
  *   `projectId` (*type:* `String.t`, *default:* `nil`) - The GCP project id of the client associated with
  *   `region` (*type:* `String.t`, *default:* `nil`) - The region the client is linked to.
  *   `runAsServiceAccount` (*type:* `String.t`, *default:* `nil`) - Default run-as service account email, set up during project provision time, that will be used to generate auth token to be used in Connector task, Rest caller task, Cloud function task and Subworkflows.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :billingType => String.t() | nil,
          :clientState => String.t() | nil,
          :cloudKmsConfig =>
            GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaCloudKmsConfig.t() | nil,
          :createTime => DateTime.t() | nil,
          :description => String.t() | nil,
          :enableHttpCall => boolean() | nil,
          :enableInternalIp => boolean() | nil,
          :enableVariableMasking => boolean() | nil,
          :id => String.t() | nil,
          :isGmek => boolean() | nil,
          :p4ServiceAccount => String.t() | nil,
          :projectId => String.t() | nil,
          :region => String.t() | nil,
          :runAsServiceAccount => String.t() | nil
        }

  field(:billingType)
  field(:clientState)

  field(:cloudKmsConfig,
    as: GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaCloudKmsConfig
  )

  field(:createTime, as: DateTime)
  field(:description)
  field(:enableHttpCall)
  field(:enableInternalIp)
  field(:enableVariableMasking)
  field(:id)
  field(:isGmek)
  field(:p4ServiceAccount)
  field(:projectId)
  field(:region)
  field(:runAsServiceAccount)
end

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

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