lib/google_api/on_demand_scanning/v1/model/recipe.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.OnDemandScanning.V1.Model.Recipe do
  @moduledoc """
  Steps taken to build the artifact. For a TaskRun, typically each container corresponds to one step in the recipe.

  ## Attributes

  *   `arguments` (*type:* `list(map())`, *default:* `nil`) - Collection of all external inputs that influenced the build on top of recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe type were "make", then this might be the flags passed to make aside from the target, which is captured in recipe.entryPoint. Since the arguments field can greatly vary in structure, depending on the builder and recipe type, this is of form "Any".
  *   `definedInMaterial` (*type:* `String.t`, *default:* `nil`) - Index in materials containing the recipe steps that are not implied by recipe.type. For example, if the recipe type were "make", then this would point to the source containing the Makefile, not the make program itself. Set to -1 if the recipe doesn't come from a material, as zero is default unset value for int64.
  *   `entryPoint` (*type:* `String.t`, *default:* `nil`) - String identifying the entry point into the build. This is often a path to a configuration file and/or a target label within that file. The syntax and meaning are defined by recipe.type. For example, if the recipe type were "make", then this would reference the directory in which to run make as well as which target to use.
  *   `environment` (*type:* `list(map())`, *default:* `nil`) - Any other builder-controlled inputs necessary for correctly evaluating the recipe. Usually only needed for reproducing the build but not evaluated as part of policy. Since the environment field can greatly vary in structure, depending on the builder and recipe type, this is of form "Any".
  *   `type` (*type:* `String.t`, *default:* `nil`) - URI indicating what type of recipe was performed. It determines the meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :arguments => list(map()) | nil,
          :definedInMaterial => String.t() | nil,
          :entryPoint => String.t() | nil,
          :environment => list(map()) | nil,
          :type => String.t() | nil
        }

  field(:arguments, type: :list)
  field(:definedInMaterial)
  field(:entryPoint)
  field(:environment, type: :list)
  field(:type)
end

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

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