# 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.CloudDeploy.V1.Model.TargetArtifact do
  @moduledoc """
  The artifacts produced by a target render operation.

  ## Attributes

  *   `artifactUri` (*type:* `String.t`, *default:* `nil`) - Output only. URI of a directory containing the artifacts. This contains deployment configuration used by Skaffold during a rollout, and all paths are relative to this location.
  *   `manifestPath` (*type:* `String.t`, *default:* `nil`) - Output only. File path of the rendered manifest relative to the URI for the stable phase.
  *   `phaseArtifacts` (*type:* `%{optional(String.t) => GoogleApi.CloudDeploy.V1.Model.PhaseArtifact.t}`, *default:* `nil`) - Output only. Map from the phase ID to the phase artifacts for the `Target`.
  *   `skaffoldConfigPath` (*type:* `String.t`, *default:* `nil`) - Output only. File path of the resolved Skaffold configuration for the stable phase, relative to the URI.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :artifactUri => String.t() | nil,
          :manifestPath => String.t() | nil,
          :phaseArtifacts =>
            %{optional(String.t()) => GoogleApi.CloudDeploy.V1.Model.PhaseArtifact.t()} | nil,
          :skaffoldConfigPath => String.t() | nil
        }

  field(:artifactUri)
  field(:manifestPath)
  field(:phaseArtifacts, as: GoogleApi.CloudDeploy.V1.Model.PhaseArtifact, type: :map)
  field(:skaffoldConfigPath)
end

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

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