# 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.SQLAdmin.V1.Model.ExportContextBakExportOptions do
  @moduledoc """
  Options for exporting BAK files (SQL Server-only)

  ## Attributes

  *   `bakType` (*type:* `String.t`, *default:* `nil`) - Type of this bak file will be export, FULL or DIFF, SQL Server only
  *   `copyOnly` (*type:* `boolean()`, *default:* `nil`) - Deprecated: copy_only is deprecated. Use differential_base instead
  *   `differentialBase` (*type:* `boolean()`, *default:* `nil`) - Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base
  *   `exportLogEndTime` (*type:* `DateTime.t`, *default:* `nil`) - Optional. The end timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs until current time will be included. Only applied to Cloud SQL for SQL Server.
  *   `exportLogStartTime` (*type:* `DateTime.t`, *default:* `nil`) - Optional. The begin timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs from the beginning of retention period will be included. Only applied to Cloud SQL for SQL Server.
  *   `stripeCount` (*type:* `integer()`, *default:* `nil`) - Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.
  *   `striped` (*type:* `boolean()`, *default:* `nil`) - Whether or not the export should be striped.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :bakType => String.t() | nil,
          :copyOnly => boolean() | nil,
          :differentialBase => boolean() | nil,
          :exportLogEndTime => DateTime.t() | nil,
          :exportLogStartTime => DateTime.t() | nil,
          :stripeCount => integer() | nil,
          :striped => boolean() | nil
        }

  field(:bakType)
  field(:copyOnly)
  field(:differentialBase)
  field(:exportLogEndTime, as: DateTime)
  field(:exportLogStartTime, as: DateTime)
  field(:stripeCount)
  field(:striped)
end

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

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