# 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.GoogleCloudIntegrationsV1alphaProvisionClientRequest do
  @moduledoc """
  Request for the Provision rpc

  ## Attributes

  *   `cloudKmsConfig` (*type:* `GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaCloudKmsConfig.t`, *default:* `nil`) - Optional. OPTIONAL: Cloud KMS config for AuthModule to encrypt/decrypt credentials.
  *   `createSampleWorkflows` (*type:* `boolean()`, *default:* `nil`) - Optional. Indicates if sample workflow should be created along with provisioning
  *   `enableHttpCall` (*type:* `boolean()`, *default:* `nil`) - Optional. Indicates if the client should be allowed to make HTTP calls.
  *   `provisionGmek` (*type:* `boolean()`, *default:* `nil`) - Optional. Deprecated. Indicates provision with GMEK or CMEK. This field is deprecated and the provision would always be GMEK if cloud_kms_config is not present in the request.
  *   `runAsServiceAccount` (*type:* `String.t`, *default:* `nil`) - Optional. User input run-as service account, if empty, will bring up a new default service account
  *   `skipCpProvision` (*type:* `boolean()`, *default:* `nil`) - Optional. Indicates if skip CP provision or not
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :cloudKmsConfig =>
            GoogleApi.Integrations.V1.Model.GoogleCloudIntegrationsV1alphaCloudKmsConfig.t() | nil,
          :createSampleWorkflows => boolean() | nil,
          :enableHttpCall => boolean() | nil,
          :provisionGmek => boolean() | nil,
          :runAsServiceAccount => String.t() | nil,
          :skipCpProvision => boolean() | nil
        }

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

  field(:createSampleWorkflows)
  field(:enableHttpCall)
  field(:provisionGmek)
  field(:runAsServiceAccount)
  field(:skipCpProvision)
end

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

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