# 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.Books.V1.Model.Bookshelf do
  @moduledoc """


  ## Attributes

  *   `access` (*type:* `String.t`, *default:* `nil`) - Whether this bookshelf is PUBLIC or PRIVATE.
  *   `created` (*type:* `String.t`, *default:* `nil`) - Created time for this bookshelf (formatted UTC timestamp with millisecond resolution).
  *   `description` (*type:* `String.t`, *default:* `nil`) - Description of this bookshelf.
  *   `id` (*type:* `integer()`, *default:* `nil`) - Id of this bookshelf, only unique by user.
  *   `kind` (*type:* `String.t`, *default:* `nil`) - Resource type for bookshelf metadata.
  *   `selfLink` (*type:* `String.t`, *default:* `nil`) - URL to this resource.
  *   `title` (*type:* `String.t`, *default:* `nil`) - Title of this bookshelf.
  *   `updated` (*type:* `String.t`, *default:* `nil`) - Last modified time of this bookshelf (formatted UTC timestamp with millisecond resolution).
  *   `volumeCount` (*type:* `integer()`, *default:* `nil`) - Number of volumes in this bookshelf.
  *   `volumesLastUpdated` (*type:* `String.t`, *default:* `nil`) - Last time a volume was added or removed from this bookshelf (formatted UTC timestamp with millisecond resolution).
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :access => String.t() | nil,
          :created => String.t() | nil,
          :description => String.t() | nil,
          :id => integer() | nil,
          :kind => String.t() | nil,
          :selfLink => String.t() | nil,
          :title => String.t() | nil,
          :updated => String.t() | nil,
          :volumeCount => integer() | nil,
          :volumesLastUpdated => String.t() | nil
        }

  field(:access)
  field(:created)
  field(:description)
  field(:id)
  field(:kind)
  field(:selfLink)
  field(:title)
  field(:updated)
  field(:volumeCount)
  field(:volumesLastUpdated)
end

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

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