Class: Google::Apis::MybusinessqandaV1::Answer

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#authorGoogle::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
  @author
end

#create_timeString

Output only. The timestamp for when the answer was written. Only retrieved during ListResponse fetching. Corresponds to the JSON property createTime

Returns:

  • (String)


38
39
40
# File 'lib/google/apis/mybusinessqanda_v1/classes.rb', line 38

def create_time
  @create_time
end

#nameString

Output only. The unique name for the answer locations//questions//answers/* Corresponds to the JSON property name

Returns:

  • (String)


43
44
45
# File 'lib/google/apis/mybusinessqanda_v1/classes.rb', line 43

def name
  @name
end

#textString

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

Returns:

  • (String)


49
50
51
# File 'lib/google/apis/mybusinessqanda_v1/classes.rb', line 49

def text
  @text
end

#update_timeString

Output only. The timestamp for when the answer was last modified. Corresponds to the JSON property updateTime

Returns:

  • (String)


54
55
56
# File 'lib/google/apis/mybusinessqanda_v1/classes.rb', line 54

def update_time
  @update_time
end

#upvote_countFixnum

Output only. The number of upvotes for the answer. Corresponds to the JSON property upvoteCount

Returns:

  • (Fixnum)


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