# 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.CsvExportOptions do
  @moduledoc """
  Options for exporting data in CSV format.

  ## Attributes

  *   `escapeCharacter` (*type:* `String.t`, *default:* `nil`) - Optional. Specifies the character that should appear before a data character that needs to be escaped. The default is the same as quote character. The value of this argument has to be a character in Hex ASCII Code.
  *   `fieldDelimiter` (*type:* `String.t`, *default:* `nil`) - Optional. Specifies the character that separates columns within each row (line) of the file. The default is comma. The value of this argument has to be a character in Hex ASCII Code.
  *   `quoteCharacter` (*type:* `String.t`, *default:* `nil`) - Optional. Specifies the quoting character to be used when a data value is quoted. The default is double-quote. The value of this argument has to be a character in Hex ASCII Code.
  *   `selectQuery` (*type:* `String.t`, *default:* `nil`) - Required. The SELECT query used to extract the data.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :escapeCharacter => String.t() | nil,
          :fieldDelimiter => String.t() | nil,
          :quoteCharacter => String.t() | nil,
          :selectQuery => String.t() | nil
        }

  field(:escapeCharacter)
  field(:fieldDelimiter)
  field(:quoteCharacter)
  field(:selectQuery)
end

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

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