Packages
Books API client library. The Google Books API allows clients to access the Google Books repository.
Current section
Files
Jump to
Current section
Files
lib/google_api/books/v1/model/annotation.ex
# 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 class is auto generated by the elixir code generator program.
# Do not edit the class manually.
defmodule GoogleApi.Books.V1.Model.Annotation do
@moduledoc """
## Attributes
* `afterSelectedText` (*type:* `String.t`, *default:* `nil`) - Anchor text after excerpt. For requests, if the user bookmarked a screen that has no flowing text on it, then this field should be empty.
* `beforeSelectedText` (*type:* `String.t`, *default:* `nil`) - Anchor text before excerpt. For requests, if the user bookmarked a screen that has no flowing text on it, then this field should be empty.
* `clientVersionRanges` (*type:* `GoogleApi.Books.V1.Model.AnnotationClientVersionRanges.t`, *default:* `nil`) - Selection ranges sent from the client.
* `created` (*type:* `DateTime.t`, *default:* `nil`) - Timestamp for the created time of this annotation.
* `currentVersionRanges` (*type:* `GoogleApi.Books.V1.Model.AnnotationCurrentVersionRanges.t`, *default:* `nil`) - Selection ranges for the most recent content version.
* `data` (*type:* `String.t`, *default:* `nil`) - User-created data for this annotation.
* `deleted` (*type:* `boolean()`, *default:* `nil`) - Indicates that this annotation is deleted.
* `highlightStyle` (*type:* `String.t`, *default:* `nil`) - The highlight style for this annotation.
* `id` (*type:* `String.t`, *default:* `nil`) - Id of this annotation, in the form of a GUID.
* `kind` (*type:* `String.t`, *default:* `books#annotation`) - Resource type.
* `layerId` (*type:* `String.t`, *default:* `nil`) - The layer this annotation is for.
* `layerSummary` (*type:* `GoogleApi.Books.V1.Model.AnnotationLayerSummary.t`, *default:* `nil`) -
* `pageIds` (*type:* `list(String.t)`, *default:* `nil`) - Pages that this annotation spans.
* `selectedText` (*type:* `String.t`, *default:* `nil`) - Excerpt from the volume.
* `selfLink` (*type:* `String.t`, *default:* `nil`) - URL to this resource.
* `updated` (*type:* `DateTime.t`, *default:* `nil`) - Timestamp for the last time this annotation was modified.
* `volumeId` (*type:* `String.t`, *default:* `nil`) - The volume that this annotation belongs to.
"""
use GoogleApi.Gax.ModelBase
@type t :: %__MODULE__{
:afterSelectedText => String.t(),
:beforeSelectedText => String.t(),
:clientVersionRanges => GoogleApi.Books.V1.Model.AnnotationClientVersionRanges.t(),
:created => DateTime.t(),
:currentVersionRanges => GoogleApi.Books.V1.Model.AnnotationCurrentVersionRanges.t(),
:data => String.t(),
:deleted => boolean(),
:highlightStyle => String.t(),
:id => String.t(),
:kind => String.t(),
:layerId => String.t(),
:layerSummary => GoogleApi.Books.V1.Model.AnnotationLayerSummary.t(),
:pageIds => list(String.t()),
:selectedText => String.t(),
:selfLink => String.t(),
:updated => DateTime.t(),
:volumeId => String.t()
}
field(:afterSelectedText)
field(:beforeSelectedText)
field(:clientVersionRanges, as: GoogleApi.Books.V1.Model.AnnotationClientVersionRanges)
field(:created, as: DateTime)
field(:currentVersionRanges, as: GoogleApi.Books.V1.Model.AnnotationCurrentVersionRanges)
field(:data)
field(:deleted)
field(:highlightStyle)
field(:id)
field(:kind)
field(:layerId)
field(:layerSummary, as: GoogleApi.Books.V1.Model.AnnotationLayerSummary)
field(:pageIds, type: :list)
field(:selectedText)
field(:selfLink)
field(:updated, as: DateTime)
field(:volumeId)
end
defimpl Poison.Decoder, for: GoogleApi.Books.V1.Model.Annotation do
def decode(value, options) do
GoogleApi.Books.V1.Model.Annotation.decode(value, options)
end
end
defimpl Poison.Encoder, for: GoogleApi.Books.V1.Model.Annotation do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end