lib/google_api/data_pipelines/v1/model/google_cloud_datapipelines_v1_launch_template_parameters.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.DataPipelines.V1.Model.GoogleCloudDatapipelinesV1LaunchTemplateParameters do
  @moduledoc """
  Parameters to provide to the template being launched.

  ## Attributes

  *   `environment` (*type:* `GoogleApi.DataPipelines.V1.Model.GoogleCloudDatapipelinesV1RuntimeEnvironment.t`, *default:* `nil`) - The runtime environment for the job.
  *   `jobName` (*type:* `String.t`, *default:* `nil`) - Required. The job name to use for the created job.
  *   `parameters` (*type:* `map()`, *default:* `nil`) - The runtime parameters to pass to the job.
  *   `transformNameMapping` (*type:* `map()`, *default:* `nil`) - Map of transform name prefixes of the job to be replaced to the corresponding name prefixes of the new job. Only applicable when updating a pipeline.
  *   `update` (*type:* `boolean()`, *default:* `nil`) - If set, replace the existing pipeline with the name specified by jobName with this pipeline, preserving state.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :environment =>
            GoogleApi.DataPipelines.V1.Model.GoogleCloudDatapipelinesV1RuntimeEnvironment.t()
            | nil,
          :jobName => String.t() | nil,
          :parameters => map() | nil,
          :transformNameMapping => map() | nil,
          :update => boolean() | nil
        }

  field(:environment,
    as: GoogleApi.DataPipelines.V1.Model.GoogleCloudDatapipelinesV1RuntimeEnvironment
  )

  field(:jobName)
  field(:parameters, type: :map)
  field(:transformNameMapping, type: :map)
  field(:update)
end

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

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