# 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.Admin.Directory_v1.Model.Asp do
  @moduledoc """
  An application-specific password (ASP) is used with applications that do not accept a verification code when logging into the application on certain devices. The ASP access code is used instead of the login and password you commonly use when accessing an application through a browser. For more information about ASPs and how to create one, see the [help center](https://support.google.com/a/answer/2537800#asp).

  ## Attributes

  *   `codeId` (*type:* `integer()`, *default:* `nil`) - The unique ID of the ASP.
  *   `creationTime` (*type:* `String.t`, *default:* `nil`) - The time when the ASP was created. Expressed in [Unix time](https://en.wikipedia.org/wiki/Epoch_time) format.
  *   `etag` (*type:* `String.t`, *default:* `nil`) - ETag of the ASP.
  *   `kind` (*type:* `String.t`, *default:* `admin#directory#asp`) - The type of the API resource. This is always `admin#directory#asp`.
  *   `lastTimeUsed` (*type:* `String.t`, *default:* `nil`) - The time when the ASP was last used. Expressed in [Unix time](https://en.wikipedia.org/wiki/Epoch_time) format.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The name of the application that the user, represented by their `userId`, entered when the ASP was created.
  *   `userKey` (*type:* `String.t`, *default:* `nil`) - The unique ID of the user who issued the ASP.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :codeId => integer() | nil,
          :creationTime => String.t() | nil,
          :etag => String.t() | nil,
          :kind => String.t() | nil,
          :lastTimeUsed => String.t() | nil,
          :name => String.t() | nil,
          :userKey => String.t() | nil
        }

  field(:codeId)
  field(:creationTime)
  field(:etag)
  field(:kind)
  field(:lastTimeUsed)
  field(:name)
  field(:userKey)
end

defimpl Poison.Decoder, for: GoogleApi.Admin.Directory_v1.Model.Asp do
  def decode(value, options) do
    GoogleApi.Admin.Directory_v1.Model.Asp.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Admin.Directory_v1.Model.Asp do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
