Class: Google::Apis::LibraryagentV1::GoogleExampleLibraryagentV1Book

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

Overview

A single book in the library.

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) ⇒ GoogleExampleLibraryagentV1Book

Returns a new instance of GoogleExampleLibraryagentV1Book



52
53
54
# File 'generated/google/apis/libraryagent_v1/classes.rb', line 52

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

Instance Attribute Details

#authorString

The name of the book author. Corresponds to the JSON property author

Returns:

  • (String)


32
33
34
# File 'generated/google/apis/libraryagent_v1/classes.rb', line 32

def author
  @author
end

#nameString

The resource name of the book. Book names have the form shelves/shelf_id/books/book_id`. The name is ignored when creating a book. Corresponds to the JSON propertyname`

Returns:

  • (String)


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

def name
  @name
end

#readBoolean Also known as: read?

Value indicating whether the book has been read. Corresponds to the JSON property read

Returns:

  • (Boolean)


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

def read
  @read
end

#titleString

The title of the book. Corresponds to the JSON property title

Returns:

  • (String)


50
51
52
# File 'generated/google/apis/libraryagent_v1/classes.rb', line 50

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



57
58
59
60
61
62
# File 'generated/google/apis/libraryagent_v1/classes.rb', line 57

def update!(**args)
  @author = args[:author] if args.key?(:author)
  @name = args[:name] if args.key?(:name)
  @read = args[:read] if args.key?(:read)
  @title = args[:title] if args.key?(:title)
end