# 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.AlloyDB.V1.Model.ExportClusterRequest do
  @moduledoc """
  Export cluster request.

  ## Attributes

  *   `csvExportOptions` (*type:* `GoogleApi.AlloyDB.V1.Model.CsvExportOptions.t`, *default:* `nil`) - Options for exporting data in CSV format. Required field to be set for CSV file type.
  *   `database` (*type:* `String.t`, *default:* `nil`) - Required. Name of the database where the export command will be executed. Note - Value provided should be the same as expected from `SELECT current_database();` and NOT as a resource reference.
  *   `gcsDestination` (*type:* `GoogleApi.AlloyDB.V1.Model.GcsDestination.t`, *default:* `nil`) - Required. Option to export data to cloud storage.
  *   `sqlExportOptions` (*type:* `GoogleApi.AlloyDB.V1.Model.SqlExportOptions.t`, *default:* `nil`) - Options for exporting data in SQL format. Required field to be set for SQL file type.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :csvExportOptions => GoogleApi.AlloyDB.V1.Model.CsvExportOptions.t() | nil,
          :database => String.t() | nil,
          :gcsDestination => GoogleApi.AlloyDB.V1.Model.GcsDestination.t() | nil,
          :sqlExportOptions => GoogleApi.AlloyDB.V1.Model.SqlExportOptions.t() | nil
        }

  field(:csvExportOptions, as: GoogleApi.AlloyDB.V1.Model.CsvExportOptions)
  field(:database)
  field(:gcsDestination, as: GoogleApi.AlloyDB.V1.Model.GcsDestination)
  field(:sqlExportOptions, as: GoogleApi.AlloyDB.V1.Model.SqlExportOptions)
end

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

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