# 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.Apigee.V1.Model.GoogleCloudApigeeV1Credential do
@moduledoc """
## Attributes
* `apiProducts` (*type:* `list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ApiProductRef.t)`, *default:* `nil`) - List of API products this credential can be used for.
* `attributes` (*type:* `list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1Attribute.t)`, *default:* `nil`) - List of attributes associated with this credential.
* `consumerKey` (*type:* `String.t`, *default:* `nil`) - Consumer key.
* `consumerSecret` (*type:* `String.t`, *default:* `nil`) - Secret key.
* `expiresAt` (*type:* `String.t`, *default:* `nil`) - Time the credential will expire in milliseconds since epoch.
* `issuedAt` (*type:* `String.t`, *default:* `nil`) - Time the credential was issued in milliseconds since epoch.
* `scopes` (*type:* `list(String.t)`, *default:* `nil`) - List of scopes to apply to the app. Specified scopes must already exist on the API product that you associate with the app.
* `status` (*type:* `String.t`, *default:* `nil`) - Status of the credential. Valid values include `approved` or `revoked`.
"""
use GoogleApi.Gax.ModelBase
@type t :: %__MODULE__{
:apiProducts =>
list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ApiProductRef.t()) | nil,
:attributes => list(GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1Attribute.t()) | nil,
:consumerKey => String.t() | nil,
:consumerSecret => String.t() | nil,
:expiresAt => String.t() | nil,
:issuedAt => String.t() | nil,
:scopes => list(String.t()) | nil,
:status => String.t() | nil
}
field(:apiProducts, as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1ApiProductRef, type: :list)
field(:attributes, as: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1Attribute, type: :list)
field(:consumerKey)
field(:consumerSecret)
field(:expiresAt)
field(:issuedAt)
field(:scopes, type: :list)
field(:status)
end
defimpl Poison.Decoder, for: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1Credential do
def decode(value, options) do
GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1Credential.decode(value, options)
end
end
defimpl Poison.Encoder, for: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1Credential do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end