Class: Google::Apis::FormsV1::Option

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

Instance Method Summary collapse

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_actionString

Section navigation type. Corresponds to the JSON property goToAction

Returns:

  • (String)


1060
1061
1062
# File 'lib/google/apis/forms_v1/classes.rb', line 1060

def go_to_action
  @go_to_action
end

#go_to_section_idString

Item ID of section header to go to. Corresponds to the JSON property goToSectionId

Returns:

  • (String)


1065
1066
1067
# File 'lib/google/apis/forms_v1/classes.rb', line 1065

def go_to_section_id
  @go_to_section_id
end

#imageGoogle::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_otherBoolean 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

Returns:

  • (Boolean)


1076
1077
1078
# File 'lib/google/apis/forms_v1/classes.rb', line 1076

def is_other
  @is_other
end

#valueString

Required. The choice as presented to the user. Corresponds to the JSON property value

Returns:

  • (String)


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