class Google::Apis::MybusinessqandaV1::Question

Represents a single question and some of its answers.

Attributes

author[RW]

Represents the author of a question or answer Corresponds to the JSON property ‘author` @return [Google::Apis::MybusinessqandaV1::Author]

create_time[RW]

Output only. The timestamp for when the question was written. Corresponds to the JSON property ‘createTime` @return [String]

name[RW]

Immutable. The unique name for the question. locations//questions/ This field will be ignored if set during question creation. Corresponds to the JSON property ‘name` @return [String]

text[RW]

Required. The text of the question. It should contain at least three words and the total length should be greater than or equal to 10 characters. The maximum length is 4096 characters. Corresponds to the JSON property ‘text` @return [String]

top_answers[RW]

Output only. A list of answers to the question, sorted by upvotes. This may not be a complete list of answers depending on the request parameters ( answers_per_question) Corresponds to the JSON property ‘topAnswers` @return [Array<Google::Apis::MybusinessqandaV1::Answer>]

total_answer_count[RW]

Output only. The total number of answers posted for this question. Corresponds to the JSON property ‘totalAnswerCount` @return [Fixnum]

update_time[RW]

Output only. The timestamp for when the question was last modified. Corresponds to the JSON property ‘updateTime` @return [String]

upvote_count[RW]

Output only. The number of upvotes for the question. Corresponds to the JSON property ‘upvoteCount` @return [Fixnum]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/mybusinessqanda_v1/classes.rb, line 239
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/mybusinessqanda_v1/classes.rb, line 244
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)
  @top_answers = args[:top_answers] if args.key?(:top_answers)
  @total_answer_count = args[:total_answer_count] if args.key?(:total_answer_count)
  @update_time = args[:update_time] if args.key?(:update_time)
  @upvote_count = args[:upvote_count] if args.key?(:upvote_count)
end