lib/google_api/run/v1/model/domain_mapping_status.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.DomainMappingStatus do
  @moduledoc """
  The current state of the Domain Mapping.

  ## Attributes

  *   `conditions` (*type:* `list(GoogleApi.Run.V1.Model.GoogleCloudRunV1Condition.t)`, *default:* `nil`) - Array of observed DomainMappingConditions, indicating the current state of the DomainMapping.
  *   `mappedRouteName` (*type:* `String.t`, *default:* `nil`) - The name of the route that the mapping currently points to.
  *   `observedGeneration` (*type:* `integer()`, *default:* `nil`) - ObservedGeneration is the 'Generation' of the DomainMapping that was last processed by the controller. Clients polling for completed reconciliation should poll until observedGeneration = metadata.generation and the Ready condition's status is True or False.
  *   `resourceRecords` (*type:* `list(GoogleApi.Run.V1.Model.ResourceRecord.t)`, *default:* `nil`) - The resource records required to configure this domain mapping. These records must be added to the domain's DNS configuration in order to serve the application via this domain mapping.
  *   `url` (*type:* `String.t`, *default:* `nil`) - Optional. Cloud Run fully managed: not supported Cloud Run on GKE: supported Holds the URL that will serve the traffic of the DomainMapping.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :conditions => list(GoogleApi.Run.V1.Model.GoogleCloudRunV1Condition.t()) | nil,
          :mappedRouteName => String.t() | nil,
          :observedGeneration => integer() | nil,
          :resourceRecords => list(GoogleApi.Run.V1.Model.ResourceRecord.t()) | nil,
          :url => String.t() | nil
        }

  field(:conditions, as: GoogleApi.Run.V1.Model.GoogleCloudRunV1Condition, type: :list)
  field(:mappedRouteName)
  field(:observedGeneration)
  field(:resourceRecords, as: GoogleApi.Run.V1.Model.ResourceRecord, type: :list)
  field(:url)
end

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

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