# 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.MyBusinessLodging.V1.Model.Policies do
  @moduledoc """
  Property rules that impact guests.

  ## Attributes

  *   `allInclusiveAvailable` (*type:* `boolean()`, *default:* `nil`) - All inclusive available. The hotel offers a rate option that includes the cost of the room, meals, activities, and other amenities that might otherwise be charged separately.
  *   `allInclusiveAvailableException` (*type:* `String.t`, *default:* `nil`) - All inclusive available exception.
  *   `allInclusiveOnly` (*type:* `boolean()`, *default:* `nil`) - All inclusive only. The only rate option offered by the hotel is a rate that includes the cost of the room, meals, activities and other amenities that might otherwise be charged separately.
  *   `allInclusiveOnlyException` (*type:* `String.t`, *default:* `nil`) - All inclusive only exception.
  *   `checkinTime` (*type:* `GoogleApi.MyBusinessLodging.V1.Model.TimeOfDay.t`, *default:* `nil`) - Check-in time. The time of the day at which the hotel begins providing guests access to their unit at the beginning of their stay.
  *   `checkinTimeException` (*type:* `String.t`, *default:* `nil`) - Check-in time exception.
  *   `checkoutTime` (*type:* `GoogleApi.MyBusinessLodging.V1.Model.TimeOfDay.t`, *default:* `nil`) - Check-out time. The time of the day on the last day of a guest's reserved stay at which the guest must vacate their room and settle their bill. Some hotels may offer late or early check out for a fee.
  *   `checkoutTimeException` (*type:* `String.t`, *default:* `nil`) - Check-out time exception.
  *   `kidsStayFree` (*type:* `boolean()`, *default:* `nil`) - Kids stay free. The children of guests are allowed to stay in the room/suite of a parent or adult without an additional fee. The policy may or may not stipulate a limit of the child's age or the overall number of children allowed.
  *   `kidsStayFreeException` (*type:* `String.t`, *default:* `nil`) - Kids stay free exception.
  *   `maxChildAge` (*type:* `integer()`, *default:* `nil`) - Max child age. The hotel allows children up to a certain age to stay in the room/suite of a parent or adult without an additional fee.
  *   `maxChildAgeException` (*type:* `String.t`, *default:* `nil`) - Max child age exception.
  *   `maxKidsStayFreeCount` (*type:* `integer()`, *default:* `nil`) - Max kids stay free count. The hotel allows a specific, defined number of children to stay in the room/suite of a parent or adult without an additional fee.
  *   `maxKidsStayFreeCountException` (*type:* `String.t`, *default:* `nil`) - Max kids stay free count exception.
  *   `paymentOptions` (*type:* `GoogleApi.MyBusinessLodging.V1.Model.PaymentOptions.t`, *default:* `nil`) - Forms of payment accepted at the property.
  *   `smokeFreeProperty` (*type:* `boolean()`, *default:* `nil`) - Smoke free property. Smoking is not allowed inside the building, on balconies, or in outside spaces. Hotels that offer a designated area for guests to smoke are not considered smoke-free properties.
  *   `smokeFreePropertyException` (*type:* `String.t`, *default:* `nil`) - Smoke free property exception.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :allInclusiveAvailable => boolean() | nil,
          :allInclusiveAvailableException => String.t() | nil,
          :allInclusiveOnly => boolean() | nil,
          :allInclusiveOnlyException => String.t() | nil,
          :checkinTime => GoogleApi.MyBusinessLodging.V1.Model.TimeOfDay.t() | nil,
          :checkinTimeException => String.t() | nil,
          :checkoutTime => GoogleApi.MyBusinessLodging.V1.Model.TimeOfDay.t() | nil,
          :checkoutTimeException => String.t() | nil,
          :kidsStayFree => boolean() | nil,
          :kidsStayFreeException => String.t() | nil,
          :maxChildAge => integer() | nil,
          :maxChildAgeException => String.t() | nil,
          :maxKidsStayFreeCount => integer() | nil,
          :maxKidsStayFreeCountException => String.t() | nil,
          :paymentOptions => GoogleApi.MyBusinessLodging.V1.Model.PaymentOptions.t() | nil,
          :smokeFreeProperty => boolean() | nil,
          :smokeFreePropertyException => String.t() | nil
        }

  field(:allInclusiveAvailable)
  field(:allInclusiveAvailableException)
  field(:allInclusiveOnly)
  field(:allInclusiveOnlyException)
  field(:checkinTime, as: GoogleApi.MyBusinessLodging.V1.Model.TimeOfDay)
  field(:checkinTimeException)
  field(:checkoutTime, as: GoogleApi.MyBusinessLodging.V1.Model.TimeOfDay)
  field(:checkoutTimeException)
  field(:kidsStayFree)
  field(:kidsStayFreeException)
  field(:maxChildAge)
  field(:maxChildAgeException)
  field(:maxKidsStayFreeCount)
  field(:maxKidsStayFreeCountException)
  field(:paymentOptions, as: GoogleApi.MyBusinessLodging.V1.Model.PaymentOptions)
  field(:smokeFreeProperty)
  field(:smokeFreePropertyException)
end

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

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