Class: Google::Apis::FormsV1::Question
- Inherits:
-
Object
- Object
- Google::Apis::FormsV1::Question
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/forms_v1/classes.rb,
lib/google/apis/forms_v1/representations.rb,
lib/google/apis/forms_v1/representations.rb
Overview
Any question. The specific type of question is known by its kind
.
Instance Attribute Summary collapse
-
#choice_question ⇒ Google::Apis::FormsV1::ChoiceQuestion
A radio/checkbox/dropdown question.
-
#date_question ⇒ Google::Apis::FormsV1::DateQuestion
A date question.
-
#file_upload_question ⇒ Google::Apis::FormsV1::FileUploadQuestion
A file upload question.
-
#grading ⇒ Google::Apis::FormsV1::Grading
Grading for a single question Corresponds to the JSON property
grading
. -
#question_id ⇒ String
Read only.
-
#required ⇒ Boolean
(also: #required?)
Whether the question must be answered in order for a respondent to submit their response.
-
#row_question ⇒ Google::Apis::FormsV1::RowQuestion
Configuration for a question that is part of a question group.
-
#scale_question ⇒ Google::Apis::FormsV1::ScaleQuestion
A scale question.
-
#text_question ⇒ Google::Apis::FormsV1::TextQuestion
A text-based question.
-
#time_question ⇒ Google::Apis::FormsV1::TimeQuestion
A time question.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Question
constructor
A new instance of Question.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Question
Returns a new instance of Question.
1170 1171 1172 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1170 def initialize(**args) update!(**args) end |
Instance Attribute Details
#choice_question ⇒ Google::Apis::FormsV1::ChoiceQuestion
A radio/checkbox/dropdown question.
Corresponds to the JSON property choiceQuestion
1119 1120 1121 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1119 def choice_question @choice_question end |
#date_question ⇒ Google::Apis::FormsV1::DateQuestion
A date question. Date questions default to just month + day.
Corresponds to the JSON property dateQuestion
1124 1125 1126 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1124 def date_question @date_question end |
#file_upload_question ⇒ Google::Apis::FormsV1::FileUploadQuestion
A file upload question. The API currently does not support creating file
upload questions.
Corresponds to the JSON property fileUploadQuestion
1130 1131 1132 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1130 def file_upload_question @file_upload_question end |
#grading ⇒ Google::Apis::FormsV1::Grading
Grading for a single question
Corresponds to the JSON property grading
1135 1136 1137 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1135 def grading @grading end |
#question_id ⇒ String
Read only. The question ID. On creation, it can be provided but the ID must
not be already used in the form. If not provided, a new ID is assigned.
Corresponds to the JSON property questionId
1141 1142 1143 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1141 def question_id @question_id end |
#required ⇒ Boolean Also known as: required?
Whether the question must be answered in order for a respondent to submit
their response.
Corresponds to the JSON property required
1147 1148 1149 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1147 def required @required end |
#row_question ⇒ Google::Apis::FormsV1::RowQuestion
Configuration for a question that is part of a question group.
Corresponds to the JSON property rowQuestion
1153 1154 1155 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1153 def row_question @row_question end |
#scale_question ⇒ Google::Apis::FormsV1::ScaleQuestion
A scale question. The user has a range of numeric values to choose from.
Corresponds to the JSON property scaleQuestion
1158 1159 1160 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1158 def scale_question @scale_question end |
#text_question ⇒ Google::Apis::FormsV1::TextQuestion
A text-based question.
Corresponds to the JSON property textQuestion
1163 1164 1165 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1163 def text_question @text_question end |
#time_question ⇒ Google::Apis::FormsV1::TimeQuestion
A time question.
Corresponds to the JSON property timeQuestion
1168 1169 1170 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1168 def time_question @time_question end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1175 def update!(**args) @choice_question = args[:choice_question] if args.key?(:choice_question) @date_question = args[:date_question] if args.key?(:date_question) @file_upload_question = args[:file_upload_question] if args.key?(:file_upload_question) @grading = args[:grading] if args.key?(:grading) @question_id = args[:question_id] if args.key?(:question_id) @required = args[:required] if args.key?(:required) @row_question = args[:row_question] if args.key?(:row_question) @scale_question = args[:scale_question] if args.key?(:scale_question) @text_question = args[:text_question] if args.key?(:text_question) @time_question = args[:time_question] if args.key?(:time_question) end |