lib/google_api/storage_transfer/v1/model/update_transfer_job_request.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.StorageTransfer.V1.Model.UpdateTransferJobRequest do
  @moduledoc """
  Request passed to UpdateTransferJob.

  ## Attributes

  *   `projectId` (*type:* `String.t`, *default:* `nil`) - Required. The ID of the Google Cloud project that owns the job.
  *   `transferJob` (*type:* `GoogleApi.StorageTransfer.V1.Model.TransferJob.t`, *default:* `nil`) - Required. The job to update. `transferJob` is expected to specify one or more of five fields: description, transfer_spec, notification_config, logging_config, and status. An `UpdateTransferJobRequest` that specifies other fields are rejected with the error INVALID_ARGUMENT. Updating a job status to DELETED requires `storagetransfer.jobs.delete` permissions.
  *   `updateTransferJobFieldMask` (*type:* `String.t`, *default:* `nil`) - The field mask of the fields in `transferJob` that are to be updated in this request. Fields in `transferJob` that can be updated are: description, transfer_spec, notification_config, logging_config, and status. To update the `transfer_spec` of the job, a complete transfer specification must be provided. An incomplete specification missing any required fields is rejected with the error INVALID_ARGUMENT.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :projectId => String.t() | nil,
          :transferJob => GoogleApi.StorageTransfer.V1.Model.TransferJob.t() | nil,
          :updateTransferJobFieldMask => String.t() | nil
        }

  field(:projectId)
  field(:transferJob, as: GoogleApi.StorageTransfer.V1.Model.TransferJob)
  field(:updateTransferJobFieldMask)
end

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

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