lib/google_api/logging/v2/model/copy_log_entries_metadata.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.Logging.V2.Model.CopyLogEntriesMetadata do
  @moduledoc """
  Metadata for CopyLogEntries long running operations.

  ## Attributes

  *   `cancellationRequested` (*type:* `boolean()`, *default:* `nil`) - Identifies whether the user has requested cancellation of the operation.
  *   `endTime` (*type:* `DateTime.t`, *default:* `nil`) - The end time of an operation.
  *   `progress` (*type:* `integer()`, *default:* `nil`) - Estimated progress of the operation (0 - 100%).
  *   `request` (*type:* `GoogleApi.Logging.V2.Model.CopyLogEntriesRequest.t`, *default:* `nil`) - CopyLogEntries RPC request.
  *   `startTime` (*type:* `DateTime.t`, *default:* `nil`) - The create time of an operation.
  *   `state` (*type:* `String.t`, *default:* `nil`) - State of an operation.
  *   `writerIdentity` (*type:* `String.t`, *default:* `nil`) - The IAM identity of a service account that must be granted access to the destination.If the service account is not granted permission to the destination within an hour, the operation will be cancelled.For example: "serviceAccount:foo@bar.com"
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :cancellationRequested => boolean() | nil,
          :endTime => DateTime.t() | nil,
          :progress => integer() | nil,
          :request => GoogleApi.Logging.V2.Model.CopyLogEntriesRequest.t() | nil,
          :startTime => DateTime.t() | nil,
          :state => String.t() | nil,
          :writerIdentity => String.t() | nil
        }

  field(:cancellationRequested)
  field(:endTime, as: DateTime)
  field(:progress)
  field(:request, as: GoogleApi.Logging.V2.Model.CopyLogEntriesRequest)
  field(:startTime, as: DateTime)
  field(:state)
  field(:writerIdentity)
end

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

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