lib/google_api/firebase/v1beta1/model/ios_app.ex

# 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.Firebase.V1beta1.Model.IosApp do
  @moduledoc """
  Details of a Firebase App for iOS.

  ## Attributes

  *   `apiKeyId` (*type:* `String.t`, *default:* `nil`) - The globally unique, Google-assigned identifier (UID) for the Firebase API key associated with the `IosApp`. Be aware that this value is the UID of the API key, _not_ the [`keyString`](https://cloud.google.com/api-keys/docs/reference/rest/v2/projects.locations.keys#Key.FIELDS.key_string) of the API key. The `keyString` is the value that can be found in the App's [configuration artifact](../../rest/v1beta1/projects.iosApps/getConfig). If `api_key_id` is not set in requests to [`iosApps.Create`](../../rest/v1beta1/projects.iosApps/create), then Firebase automatically associates an `api_key_id` with the `IosApp`. This auto-associated key may be an existing valid key or, if no valid key exists, a new one will be provisioned. In patch requests, `api_key_id` cannot be set to an empty value, and the new UID must have no restrictions or only have restrictions that are valid for the associated `IosApp`. We recommend using the [Google Cloud Console](https://console.cloud.google.com/apis/credentials) to manage API keys.
  *   `appId` (*type:* `String.t`, *default:* `nil`) - Output only. Immutable. The globally unique, Firebase-assigned identifier for the `IosApp`. This identifier should be treated as an opaque token, as the data format is not specified.
  *   `appStoreId` (*type:* `String.t`, *default:* `nil`) - The automatically generated Apple ID assigned to the iOS app by Apple in the iOS App Store.
  *   `bundleId` (*type:* `String.t`, *default:* `nil`) - Immutable. The canonical bundle ID of the iOS app as it would appear in the iOS AppStore.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - The user-assigned display name for the `IosApp`.
  *   `etag` (*type:* `String.t`, *default:* `nil`) - This checksum is computed by the server based on the value of other fields, and it may be sent with update requests to ensure the client has an up-to-date value before proceeding. Learn more about `etag` in Google's [AIP-154 standard](https://google.aip.dev/154#declarative-friendly-resources). This etag is strongly validated.
  *   `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. If the App has been removed from the Project, this is the timestamp of when the App is considered expired and will be permanently deleted. After this time, the App cannot be undeleted (that is, restored to the Project). This value is only provided if the App is in the `DELETED` state.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the IosApp, in the format: projects/PROJECT_IDENTIFIER /iosApps/APP_ID * PROJECT_IDENTIFIER: the parent Project's [`ProjectNumber`](../projects#FirebaseProject.FIELDS.project_number) ***(recommended)*** or its [`ProjectId`](../projects#FirebaseProject.FIELDS.project_id). Learn more about using project identifiers in Google's [AIP 2510 standard](https://google.aip.dev/cloud/2510). Note that the value for PROJECT_IDENTIFIER in any response body will be the `ProjectId`. * APP_ID: the globally unique, Firebase-assigned identifier for the App (see [`appId`](../projects.iosApps#IosApp.FIELDS.app_id)).
  *   `projectId` (*type:* `String.t`, *default:* `nil`) - Output only. Immutable. A user-assigned unique identifier of the parent FirebaseProject for the `IosApp`.
  *   `state` (*type:* `String.t`, *default:* `nil`) - Output only. The lifecycle state of the App.
  *   `teamId` (*type:* `String.t`, *default:* `nil`) - The Apple Developer Team ID associated with the App in the App Store.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :apiKeyId => String.t() | nil,
          :appId => String.t() | nil,
          :appStoreId => String.t() | nil,
          :bundleId => String.t() | nil,
          :displayName => String.t() | nil,
          :etag => String.t() | nil,
          :expireTime => DateTime.t() | nil,
          :name => String.t() | nil,
          :projectId => String.t() | nil,
          :state => String.t() | nil,
          :teamId => String.t() | nil
        }

  field(:apiKeyId)
  field(:appId)
  field(:appStoreId)
  field(:bundleId)
  field(:displayName)
  field(:etag)
  field(:expireTime, as: DateTime)
  field(:name)
  field(:projectId)
  field(:state)
  field(:teamId)
end

defimpl Poison.Decoder, for: GoogleApi.Firebase.V1beta1.Model.IosApp do
  def decode(value, options) do
    GoogleApi.Firebase.V1beta1.Model.IosApp.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Firebase.V1beta1.Model.IosApp do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end