# 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.Admin.Directory_v1.Model.Building do
  @moduledoc """
  Public API: Resources.buildings

  ## Attributes

  *   `address` (*type:* `GoogleApi.Admin.Directory_v1.Model.BuildingAddress.t`, *default:* `nil`) - The postal address of the building. See [`PostalAddress`](/my-business/reference/rest/v4/PostalAddress) for details. Note that only a single address line and region code are required.
  *   `buildingId` (*type:* `String.t`, *default:* `nil`) - Unique identifier for the building. The maximum length is 100 characters.
  *   `buildingName` (*type:* `String.t`, *default:* `nil`) - The building name as seen by users in Calendar. Must be unique for the customer. For example, "NYC-CHEL". The maximum length is 100 characters.
  *   `coordinates` (*type:* `GoogleApi.Admin.Directory_v1.Model.BuildingCoordinates.t`, *default:* `nil`) - The geographic coordinates of the center of the building, expressed as latitude and longitude in decimal degrees.
  *   `description` (*type:* `String.t`, *default:* `nil`) - A brief description of the building. For example, "Chelsea Market".
  *   `etags` (*type:* `String.t`, *default:* `nil`) - ETag of the resource.
  *   `floorNames` (*type:* `list(String.t)`, *default:* `nil`) - The display names for all floors in this building. The floors are expected to be sorted in ascending order, from lowest floor to highest floor. For example, ["B2", "B1", "L", "1", "2", "2M", "3", "PH"] Must contain at least one entry.
  *   `kind` (*type:* `String.t`, *default:* `admin#directory#resources#buildings#Building`) - Kind of resource this is.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :address => GoogleApi.Admin.Directory_v1.Model.BuildingAddress.t() | nil,
          :buildingId => String.t() | nil,
          :buildingName => String.t() | nil,
          :coordinates => GoogleApi.Admin.Directory_v1.Model.BuildingCoordinates.t() | nil,
          :description => String.t() | nil,
          :etags => String.t() | nil,
          :floorNames => list(String.t()) | nil,
          :kind => String.t() | nil
        }

  field(:address, as: GoogleApi.Admin.Directory_v1.Model.BuildingAddress)
  field(:buildingId)
  field(:buildingName)
  field(:coordinates, as: GoogleApi.Admin.Directory_v1.Model.BuildingCoordinates)
  field(:description)
  field(:etags)
  field(:floorNames, type: :list)
  field(:kind)
end

defimpl Poison.Decoder, for: GoogleApi.Admin.Directory_v1.Model.Building do
  def decode(value, options) do
    GoogleApi.Admin.Directory_v1.Model.Building.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Admin.Directory_v1.Model.Building do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
