lib/google_api/storage_transfer/v1/model/logging_config.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.LoggingConfig do
  @moduledoc """
  Specifies the logging behavior for transfer operations. For cloud-to-cloud transfers, logs are sent to Cloud Logging. See [Read transfer logs](https://cloud.google.com/storage-transfer/docs/read-transfer-logs) for details. For transfers to or from a POSIX file system, logs are stored in the Cloud Storage bucket that is the source or sink of the transfer. See [Managing Transfer for on-premises jobs] (https://cloud.google.com/storage-transfer/docs/managing-on-prem-jobs#viewing-logs) for details.

  ## Attributes

  *   `enableOnpremGcsTransferLogs` (*type:* `boolean()`, *default:* `nil`) - For transfers with a PosixFilesystem source, this option enables the Cloud Storage transfer logs for this transfer.
  *   `logActionStates` (*type:* `list(String.t)`, *default:* `nil`) - States in which `log_actions` are logged. If empty, no logs are generated. Not supported for transfers with PosixFilesystem data sources; use enable_onprem_gcs_transfer_logs instead.
  *   `logActions` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the actions to be logged. If empty, no logs are generated. Not supported for transfers with PosixFilesystem data sources; use enable_onprem_gcs_transfer_logs instead.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :enableOnpremGcsTransferLogs => boolean() | nil,
          :logActionStates => list(String.t()) | nil,
          :logActions => list(String.t()) | nil
        }

  field(:enableOnpremGcsTransferLogs)
  field(:logActionStates, type: :list)
  field(:logActions, type: :list)
end

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

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