lib/google_api/run/v1/model/object_meta.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.Run.V1.Model.ObjectMeta do
  @moduledoc """
  google.cloud.run.meta.v1.ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.

  ## Attributes

  *   `annotations` (*type:* `map()`, *default:* `nil`) - Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. In Cloud Run, annotations with 'run.googleapis.com/' and 'autoscaling.knative.dev' are restricted, and the accepted annotations will be different depending on the resource type. * `autoscaling.knative.dev/maxScale`: Revision. * `autoscaling.knative.dev/minScale`: Revision. * `run.googleapis.com/binary-authorization-breakglass`: Service, Job, * `run.googleapis.com/binary-authorization`: Service, Job, Execution. * `run.googleapis.com/client-name`: All resources. * `run.googleapis.com/cloudsql-instances`: Revision, Execution. * `run.googleapis.com/container-dependencies`: Revision . * `run.googleapis.com/cpu-throttling`: Revision. * `run.googleapis.com/custom-audiences`: Service. * `run.googleapis.com/default-url-disabled`: Service. * `run.googleapis.com/description`: Service. * `run.googleapis.com/encryption-key-shutdown-hours`: Revision * `run.googleapis.com/encryption-key`: Revision, Execution. * `run.googleapis.com/execution-environment`: Revision, Execution. * `run.googleapis.com/gc-traffic-tags`: Service. * `run.googleapis.com/ingress`: Service. * `run.googleapis.com/launch-stage`: Service, Job. * `run.googleapis.com/minScale`: Service (ALPHA) * `run.googleapis.com/network-interfaces`: Revision, Execution. * `run.googleapis.com/post-key-revocation-action-type`: Revision. * `run.googleapis.com/secrets`: Revision, Execution. * `run.googleapis.com/secure-session-agent`: Revision. * `run.googleapis.com/sessionAffinity`: Revision. * `run.googleapis.com/startup-cpu-boost`: Revision. * `run.googleapis.com/vpc-access-connector`: Revision, Execution. * `run.googleapis.com/vpc-access-egress`: Revision, Execution.
  *   `clusterName` (*type:* `String.t`, *default:* `nil`) - Not supported by Cloud Run
  *   `creationTimestamp` (*type:* `DateTime.t`, *default:* `nil`) - UTC timestamp representing the server time when this object was created.
  *   `deletionGracePeriodSeconds` (*type:* `integer()`, *default:* `nil`) - Not supported by Cloud Run
  *   `deletionTimestamp` (*type:* `DateTime.t`, *default:* `nil`) - The read-only soft deletion timestamp for this resource. In Cloud Run, users are not able to set this field. Instead, they must call the corresponding Delete API.
  *   `finalizers` (*type:* `list(String.t)`, *default:* `nil`) - Not supported by Cloud Run
  *   `generateName` (*type:* `String.t`, *default:* `nil`) - Not supported by Cloud Run
  *   `generation` (*type:* `integer()`, *default:* `nil`) - A system-provided sequence number representing a specific generation of the desired state.
  *   `labels` (*type:* `map()`, *default:* `nil`) - Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and routes.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Required. The name of the resource. Name is required when creating top-level resources (Service, Job), must be unique within a Cloud Run project/region, and cannot be changed once created.
  *   `namespace` (*type:* `String.t`, *default:* `nil`) - Required. Defines the space within each name must be unique within a Cloud Run region. In Cloud Run, it must be project ID or number.
  *   `ownerReferences` (*type:* `list(GoogleApi.Run.V1.Model.OwnerReference.t)`, *default:* `nil`) - Not supported by Cloud Run
  *   `resourceVersion` (*type:* `String.t`, *default:* `nil`) - Opaque, system-generated value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server or omit the value to disable conflict-detection.
  *   `selfLink` (*type:* `String.t`, *default:* `nil`) - URL representing this object.
  *   `uid` (*type:* `String.t`, *default:* `nil`) - Unique, system-generated identifier for this resource.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :annotations => map() | nil,
          :clusterName => String.t() | nil,
          :creationTimestamp => DateTime.t() | nil,
          :deletionGracePeriodSeconds => integer() | nil,
          :deletionTimestamp => DateTime.t() | nil,
          :finalizers => list(String.t()) | nil,
          :generateName => String.t() | nil,
          :generation => integer() | nil,
          :labels => map() | nil,
          :name => String.t() | nil,
          :namespace => String.t() | nil,
          :ownerReferences => list(GoogleApi.Run.V1.Model.OwnerReference.t()) | nil,
          :resourceVersion => String.t() | nil,
          :selfLink => String.t() | nil,
          :uid => String.t() | nil
        }

  field(:annotations, type: :map)
  field(:clusterName)
  field(:creationTimestamp, as: DateTime)
  field(:deletionGracePeriodSeconds)
  field(:deletionTimestamp, as: DateTime)
  field(:finalizers, type: :list)
  field(:generateName)
  field(:generation)
  field(:labels, type: :map)
  field(:name)
  field(:namespace)
  field(:ownerReferences, as: GoogleApi.Run.V1.Model.OwnerReference, type: :list)
  field(:resourceVersion)
  field(:selfLink)
  field(:uid)
end

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

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