lib/google_api/storage_transfer/v1/model/metadata_options.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.MetadataOptions do
  @moduledoc """
  Specifies the metadata options for running a transfer.

  ## Attributes

  *   `acl` (*type:* `String.t`, *default:* `nil`) - Specifies how each object's ACLs should be preserved for transfers between Google Cloud Storage buckets. If unspecified, the default behavior is the same as ACL_DESTINATION_BUCKET_DEFAULT.
  *   `gid` (*type:* `String.t`, *default:* `nil`) - Specifies how each file's POSIX group ID (GID) attribute should be handled by the transfer. By default, GID is not preserved. Only applicable to transfers involving POSIX file systems, and ignored for other transfers.
  *   `kmsKey` (*type:* `String.t`, *default:* `nil`) - Specifies how each object's Cloud KMS customer-managed encryption key (CMEK) is preserved for transfers between Google Cloud Storage buckets. If unspecified, the default behavior is the same as KMS_KEY_DESTINATION_BUCKET_DEFAULT.
  *   `mode` (*type:* `String.t`, *default:* `nil`) - Specifies how each file's mode attribute should be handled by the transfer. By default, mode is not preserved. Only applicable to transfers involving POSIX file systems, and ignored for other transfers.
  *   `storageClass` (*type:* `String.t`, *default:* `nil`) - Specifies the storage class to set on objects being transferred to Google Cloud Storage buckets. If unspecified, the default behavior is the same as STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT.
  *   `symlink` (*type:* `String.t`, *default:* `nil`) - Specifies how symlinks should be handled by the transfer. By default, symlinks are not preserved. Only applicable to transfers involving POSIX file systems, and ignored for other transfers.
  *   `temporaryHold` (*type:* `String.t`, *default:* `nil`) - Specifies how each object's temporary hold status should be preserved for transfers between Google Cloud Storage buckets. If unspecified, the default behavior is the same as TEMPORARY_HOLD_PRESERVE.
  *   `timeCreated` (*type:* `String.t`, *default:* `nil`) - Specifies how each object's `timeCreated` metadata is preserved for transfers. If unspecified, the default behavior is the same as TIME_CREATED_SKIP.
  *   `uid` (*type:* `String.t`, *default:* `nil`) - Specifies how each file's POSIX user ID (UID) attribute should be handled by the transfer. By default, UID is not preserved. Only applicable to transfers involving POSIX file systems, and ignored for other transfers.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :acl => String.t() | nil,
          :gid => String.t() | nil,
          :kmsKey => String.t() | nil,
          :mode => String.t() | nil,
          :storageClass => String.t() | nil,
          :symlink => String.t() | nil,
          :temporaryHold => String.t() | nil,
          :timeCreated => String.t() | nil,
          :uid => String.t() | nil
        }

  field(:acl)
  field(:gid)
  field(:kmsKey)
  field(:mode)
  field(:storageClass)
  field(:symlink)
  field(:temporaryHold)
  field(:timeCreated)
  field(:uid)
end

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

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