Class: Google::Apis::BooksV1::Annotation

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/books_v1/classes.rb,
generated/google/apis/books_v1/representations.rb,
generated/google/apis/books_v1/representations.rb

Defined Under Namespace

Classes: ClientVersionRanges, CurrentVersionRanges, LayerSummary

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Annotation

Returns a new instance of Annotation.


117
118
119
# File 'generated/google/apis/books_v1/classes.rb', line 117

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#after_selected_textString

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. Corresponds to the JSON property afterSelectedText

Returns:

  • (String)

33
34
35
# File 'generated/google/apis/books_v1/classes.rb', line 33

def after_selected_text
  @after_selected_text
end

#before_selected_textString

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. Corresponds to the JSON property beforeSelectedText

Returns:

  • (String)

39
40
41
# File 'generated/google/apis/books_v1/classes.rb', line 39

def before_selected_text
  @before_selected_text
end

#client_version_rangesGoogle::Apis::BooksV1::Annotation::ClientVersionRanges

Selection ranges sent from the client. Corresponds to the JSON property clientVersionRanges


44
45
46
# File 'generated/google/apis/books_v1/classes.rb', line 44

def client_version_ranges
  @client_version_ranges
end

#createdDateTime

Timestamp for the created time of this annotation. Corresponds to the JSON property created

Returns:

  • (DateTime)

49
50
51
# File 'generated/google/apis/books_v1/classes.rb', line 49

def created
  @created
end

#current_version_rangesGoogle::Apis::BooksV1::Annotation::CurrentVersionRanges

Selection ranges for the most recent content version. Corresponds to the JSON property currentVersionRanges


54
55
56
# File 'generated/google/apis/books_v1/classes.rb', line 54

def current_version_ranges
  @current_version_ranges
end

#dataString

User-created data for this annotation. Corresponds to the JSON property data

Returns:

  • (String)

59
60
61
# File 'generated/google/apis/books_v1/classes.rb', line 59

def data
  @data
end

#deletedBoolean Also known as: deleted?

Indicates that this annotation is deleted. Corresponds to the JSON property deleted

Returns:

  • (Boolean)

64
65
66
# File 'generated/google/apis/books_v1/classes.rb', line 64

def deleted
  @deleted
end

#highlight_styleString

The highlight style for this annotation. Corresponds to the JSON property highlightStyle

Returns:

  • (String)

70
71
72
# File 'generated/google/apis/books_v1/classes.rb', line 70

def highlight_style
  @highlight_style
end

#idString

Id of this annotation, in the form of a GUID. Corresponds to the JSON property id

Returns:

  • (String)

75
76
77
# File 'generated/google/apis/books_v1/classes.rb', line 75

def id
  @id
end

#kindString

Resource type. Corresponds to the JSON property kind

Returns:

  • (String)

80
81
82
# File 'generated/google/apis/books_v1/classes.rb', line 80

def kind
  @kind
end

#layer_idString

The layer this annotation is for. Corresponds to the JSON property layerId

Returns:

  • (String)

85
86
87
# File 'generated/google/apis/books_v1/classes.rb', line 85

def layer_id
  @layer_id
end

#layer_summaryGoogle::Apis::BooksV1::Annotation::LayerSummary

Corresponds to the JSON property layerSummary


90
91
92
# File 'generated/google/apis/books_v1/classes.rb', line 90

def layer_summary
  @layer_summary
end

#page_idsArray<String>

Pages that this annotation spans. Corresponds to the JSON property pageIds

Returns:

  • (Array<String>)

95
96
97
# File 'generated/google/apis/books_v1/classes.rb', line 95

def page_ids
  @page_ids
end

#selected_textString

Excerpt from the volume. Corresponds to the JSON property selectedText

Returns:

  • (String)

100
101
102
# File 'generated/google/apis/books_v1/classes.rb', line 100

def selected_text
  @selected_text
end

URL to this resource. Corresponds to the JSON property selfLink

Returns:

  • (String)

105
106
107
# File 'generated/google/apis/books_v1/classes.rb', line 105

def self_link
  @self_link
end

#updatedDateTime

Timestamp for the last time this annotation was modified. Corresponds to the JSON property updated

Returns:

  • (DateTime)

110
111
112
# File 'generated/google/apis/books_v1/classes.rb', line 110

def updated
  @updated
end

#volume_idString

The volume that this annotation belongs to. Corresponds to the JSON property volumeId

Returns:

  • (String)

115
116
117
# File 'generated/google/apis/books_v1/classes.rb', line 115

def volume_id
  @volume_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'generated/google/apis/books_v1/classes.rb', line 122

def update!(**args)
  @after_selected_text = args[:after_selected_text] if args.key?(:after_selected_text)
  @before_selected_text = args[:before_selected_text] if args.key?(:before_selected_text)
  @client_version_ranges = args[:client_version_ranges] if args.key?(:client_version_ranges)
  @created = args[:created] if args.key?(:created)
  @current_version_ranges = args[:current_version_ranges] if args.key?(:current_version_ranges)
  @data = args[:data] if args.key?(:data)
  @deleted = args[:deleted] if args.key?(:deleted)
  @highlight_style = args[:highlight_style] if args.key?(:highlight_style)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @layer_id = args[:layer_id] if args.key?(:layer_id)
  @layer_summary = args[:layer_summary] if args.key?(:layer_summary)
  @page_ids = args[:page_ids] if args.key?(:page_ids)
  @selected_text = args[:selected_text] if args.key?(:selected_text)
  @self_link = args[:self_link] if args.key?(:self_link)
  @updated = args[:updated] if args.key?(:updated)
  @volume_id = args[:volume_id] if args.key?(:volume_id)
end