Class: Google::Apis::MybusinessqandaV1::Answer
- Inherits:
-
Object
- Object
- Google::Apis::MybusinessqandaV1::Answer
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/mybusinessqanda_v1/classes.rb,
lib/google/apis/mybusinessqanda_v1/representations.rb,
lib/google/apis/mybusinessqanda_v1/representations.rb
Overview
Represents an answer to a question
Instance Attribute Summary collapse
-
#author ⇒ Google::Apis::MybusinessqandaV1::Author
Represents the author of a question or answer Corresponds to the JSON property
author
. -
#create_time ⇒ String
Output only.
-
#name ⇒ String
Output only.
-
#text ⇒ String
Required.
-
#update_time ⇒ String
Output only.
-
#upvote_count ⇒ Fixnum
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Answer
constructor
A new instance of Answer.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Answer
Returns a new instance of Answer.
61 62 63 |
# File 'lib/google/apis/mybusinessqanda_v1/classes.rb', line 61 def initialize(**args) update!(**args) end |
Instance Attribute Details
#author ⇒ Google::Apis::MybusinessqandaV1::Author
Represents the author of a question or answer
Corresponds to the JSON property author
32 33 34 |
# File 'lib/google/apis/mybusinessqanda_v1/classes.rb', line 32 def @author end |
#create_time ⇒ String
Output only. The timestamp for when the answer was written. Only retrieved
during ListResponse fetching.
Corresponds to the JSON property createTime
38 39 40 |
# File 'lib/google/apis/mybusinessqanda_v1/classes.rb', line 38 def create_time @create_time end |
#name ⇒ String
Output only. The unique name for the answer locations//questions//answers/*
Corresponds to the JSON property name
43 44 45 |
# File 'lib/google/apis/mybusinessqanda_v1/classes.rb', line 43 def name @name end |
#text ⇒ String
Required. The text of the answer. It should contain at least one non-
whitespace character. The maximum length is 4096 characters.
Corresponds to the JSON property text
49 50 51 |
# File 'lib/google/apis/mybusinessqanda_v1/classes.rb', line 49 def text @text end |
#update_time ⇒ String
Output only. The timestamp for when the answer was last modified.
Corresponds to the JSON property updateTime
54 55 56 |
# File 'lib/google/apis/mybusinessqanda_v1/classes.rb', line 54 def update_time @update_time end |
#upvote_count ⇒ Fixnum
Output only. The number of upvotes for the answer.
Corresponds to the JSON property upvoteCount
59 60 61 |
# File 'lib/google/apis/mybusinessqanda_v1/classes.rb', line 59 def upvote_count @upvote_count end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
66 67 68 69 70 71 72 73 |
# File 'lib/google/apis/mybusinessqanda_v1/classes.rb', line 66 def update!(**args) @author = args[:author] if args.key?(:author) @create_time = args[:create_time] if args.key?(:create_time) @name = args[:name] if args.key?(:name) @text = args[:text] if args.key?(:text) @update_time = args[:update_time] if args.key?(:update_time) @upvote_count = args[:upvote_count] if args.key?(:upvote_count) end |