# 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.OSLogin.V1alpha.Model.GoogleCloudOsloginControlplaneRegionalV1alphaSignSshPublicKeyRequest do
  @moduledoc """
  A request message for signing an SSH public key.

  ## Attributes

  *   `appEngineInstance` (*type:* `String.t`, *default:* `nil`) - The App Engine instance to sign the SSH public key for. Expected format: services/{service}/versions/{version}/instances/{instance}
  *   `computeInstance` (*type:* `String.t`, *default:* `nil`) - The Compute instance to sign the SSH public key for. Expected format: projects/{project}/zones/{zone}/instances/{numeric_instance_id}
  *   `serviceAccount` (*type:* `String.t`, *default:* `nil`) - Optional. The service account for the instance. If the instance in question does not have a service account, this field should be left empty. If the wrong service account is provided, this operation will return a signed certificate that will not be accepted by the VM.
  *   `sshPublicKey` (*type:* `String.t`, *default:* `nil`) - Required. The SSH public key to sign.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :appEngineInstance => String.t() | nil,
          :computeInstance => String.t() | nil,
          :serviceAccount => String.t() | nil,
          :sshPublicKey => String.t() | nil
        }

  field(:appEngineInstance)
  field(:computeInstance)
  field(:serviceAccount)
  field(:sshPublicKey)
end

defimpl Poison.Decoder,
  for:
    GoogleApi.OSLogin.V1alpha.Model.GoogleCloudOsloginControlplaneRegionalV1alphaSignSshPublicKeyRequest do
  def decode(value, options) do
    GoogleApi.OSLogin.V1alpha.Model.GoogleCloudOsloginControlplaneRegionalV1alphaSignSshPublicKeyRequest.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for:
    GoogleApi.OSLogin.V1alpha.Model.GoogleCloudOsloginControlplaneRegionalV1alphaSignSshPublicKeyRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
