lib/google_api/big_query/v2/model/job_configuration.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.BigQuery.V2.Model.JobConfiguration do
  @moduledoc """


  ## Attributes

  *   `copy` (*type:* `GoogleApi.BigQuery.V2.Model.JobConfigurationTableCopy.t`, *default:* `nil`) - [Pick one] Copies a table.
  *   `dryRun` (*type:* `boolean()`, *default:* `nil`) - [Optional] If set, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. Behavior of non-query jobs is undefined.
  *   `extract` (*type:* `GoogleApi.BigQuery.V2.Model.JobConfigurationExtract.t`, *default:* `nil`) - [Pick one] Configures an extract job.
  *   `jobTimeoutMs` (*type:* `String.t`, *default:* `nil`) - [Optional] Job timeout in milliseconds. If this time limit is exceeded, BigQuery may attempt to terminate the job.
  *   `jobType` (*type:* `String.t`, *default:* `nil`) - [Output-only] The type of the job. Can be QUERY, LOAD, EXTRACT, COPY or UNKNOWN.
  *   `labels` (*type:* `map()`, *default:* `nil`) - The labels associated with this job. You can use these to organize and group your jobs. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.
  *   `load` (*type:* `GoogleApi.BigQuery.V2.Model.JobConfigurationLoad.t`, *default:* `nil`) - [Pick one] Configures a load job.
  *   `query` (*type:* `GoogleApi.BigQuery.V2.Model.JobConfigurationQuery.t`, *default:* `nil`) - [Pick one] Configures a query job.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :copy => GoogleApi.BigQuery.V2.Model.JobConfigurationTableCopy.t() | nil,
          :dryRun => boolean() | nil,
          :extract => GoogleApi.BigQuery.V2.Model.JobConfigurationExtract.t() | nil,
          :jobTimeoutMs => String.t() | nil,
          :jobType => String.t() | nil,
          :labels => map() | nil,
          :load => GoogleApi.BigQuery.V2.Model.JobConfigurationLoad.t() | nil,
          :query => GoogleApi.BigQuery.V2.Model.JobConfigurationQuery.t() | nil
        }

  field(:copy, as: GoogleApi.BigQuery.V2.Model.JobConfigurationTableCopy)
  field(:dryRun)
  field(:extract, as: GoogleApi.BigQuery.V2.Model.JobConfigurationExtract)
  field(:jobTimeoutMs)
  field(:jobType)
  field(:labels, type: :map)
  field(:load, as: GoogleApi.BigQuery.V2.Model.JobConfigurationLoad)
  field(:query, as: GoogleApi.BigQuery.V2.Model.JobConfigurationQuery)
end

defimpl Poison.Decoder, for: GoogleApi.BigQuery.V2.Model.JobConfiguration do
  def decode(value, options) do
    GoogleApi.BigQuery.V2.Model.JobConfiguration.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.BigQuery.V2.Model.JobConfiguration do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end