Class: Google::Apis::FormsV1::Option
- Inherits:
-
Object
- Object
- Google::Apis::FormsV1::Option
- 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
An option for a Choice question.
Instance Attribute Summary collapse
-
#go_to_action ⇒ String
Section navigation type.
-
#go_to_section_id ⇒ String
Item ID of section header to go to.
-
#image ⇒ Google::Apis::FormsV1::Image
Data representing an image.
-
#is_other ⇒ Boolean
(also: #is_other?)
Whether the option is "other".
-
#value ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Option
constructor
A new instance of Option.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Option
Returns a new instance of Option.
1084 1085 1086 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1084 def initialize(**args) update!(**args) end |
Instance Attribute Details
#go_to_action ⇒ String
Section navigation type.
Corresponds to the JSON property goToAction
1060 1061 1062 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1060 def go_to_action @go_to_action end |
#go_to_section_id ⇒ String
Item ID of section header to go to.
Corresponds to the JSON property goToSectionId
1065 1066 1067 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1065 def go_to_section_id @go_to_section_id end |
#image ⇒ Google::Apis::FormsV1::Image
Data representing an image.
Corresponds to the JSON property image
1070 1071 1072 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1070 def image @image end |
#is_other ⇒ Boolean Also known as: is_other?
Whether the option is "other". Currently only applies to RADIO
and CHECKBOX
choice types, but is not allowed in a QuestionGroupItem.
Corresponds to the JSON property isOther
1076 1077 1078 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1076 def is_other @is_other end |
#value ⇒ String
Required. The choice as presented to the user.
Corresponds to the JSON property value
1082 1083 1084 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1082 def value @value end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1089 1090 1091 1092 1093 1094 1095 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1089 def update!(**args) @go_to_action = args[:go_to_action] if args.key?(:go_to_action) @go_to_section_id = args[:go_to_section_id] if args.key?(:go_to_section_id) @image = args[:image] if args.key?(:image) @is_other = args[:is_other] if args.key?(:is_other) @value = args[:value] if args.key?(:value) end |