# 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.V1beta4.Model.DenyMaintenancePeriod do
  @moduledoc """
  Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.

  ## Attributes

  *   `endDate` (*type:* `String.t`, *default:* `nil`) - "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
  *   `startDate` (*type:* `String.t`, *default:* `nil`) - "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
  *   `time` (*type:* `String.t`, *default:* `nil`) - Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :endDate => String.t() | nil,
          :startDate => String.t() | nil,
          :time => String.t() | nil
        }

  field(:endDate)
  field(:startDate)
  field(:time)
end

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

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