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

Constructor Details

#initialize(**args) ⇒ GoogleExampleLibraryagentV1Book

Returns a new instance of GoogleExampleLibraryagentV1Book.



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

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)


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

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)


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

def read
  @read
end

#titleString

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

Returns:

  • (String)


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

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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