Class: Google::Apis::FormsV1::Item
- Inherits:
-
Object
- Object
- Google::Apis::FormsV1::Item
- 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
A single item of the form. kind
defines which kind of item it is.
Instance Attribute Summary collapse
-
#description ⇒ String
The description of the item.
-
#image_item ⇒ Google::Apis::FormsV1::ImageItem
An item containing an image.
-
#item_id ⇒ String
The item ID.
-
#page_break_item ⇒ Google::Apis::FormsV1::PageBreakItem
A page break.
-
#question_group_item ⇒ Google::Apis::FormsV1::QuestionGroupItem
Defines a question that comprises multiple questions grouped together.
-
#question_item ⇒ Google::Apis::FormsV1::QuestionItem
A form item containing a single question.
-
#text_item ⇒ Google::Apis::FormsV1::TextItem
A text item.
-
#title ⇒ String
The title of the item.
-
#video_item ⇒ Google::Apis::FormsV1::VideoItem
An item containing a video.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Item
constructor
A new instance of Item.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Item
Returns a new instance of Item.
915 916 917 |
# File 'lib/google/apis/forms_v1/classes.rb', line 915 def initialize(**args) update!(**args) end |
Instance Attribute Details
#description ⇒ String
The description of the item.
Corresponds to the JSON property description
871 872 873 |
# File 'lib/google/apis/forms_v1/classes.rb', line 871 def description @description end |
#image_item ⇒ Google::Apis::FormsV1::ImageItem
An item containing an image.
Corresponds to the JSON property imageItem
876 877 878 |
# File 'lib/google/apis/forms_v1/classes.rb', line 876 def image_item @image_item end |
#item_id ⇒ String
The item 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 itemId
882 883 884 |
# File 'lib/google/apis/forms_v1/classes.rb', line 882 def item_id @item_id end |
#page_break_item ⇒ Google::Apis::FormsV1::PageBreakItem
A page break. The title and description of this item are shown at the top of
the new page.
Corresponds to the JSON property pageBreakItem
888 889 890 |
# File 'lib/google/apis/forms_v1/classes.rb', line 888 def page_break_item @page_break_item end |
#question_group_item ⇒ Google::Apis::FormsV1::QuestionGroupItem
Defines a question that comprises multiple questions grouped together.
Corresponds to the JSON property questionGroupItem
893 894 895 |
# File 'lib/google/apis/forms_v1/classes.rb', line 893 def question_group_item @question_group_item end |
#question_item ⇒ Google::Apis::FormsV1::QuestionItem
A form item containing a single question.
Corresponds to the JSON property questionItem
898 899 900 |
# File 'lib/google/apis/forms_v1/classes.rb', line 898 def question_item @question_item end |
#text_item ⇒ Google::Apis::FormsV1::TextItem
A text item.
Corresponds to the JSON property textItem
903 904 905 |
# File 'lib/google/apis/forms_v1/classes.rb', line 903 def text_item @text_item end |
#title ⇒ String
The title of the item.
Corresponds to the JSON property title
908 909 910 |
# File 'lib/google/apis/forms_v1/classes.rb', line 908 def title @title end |
#video_item ⇒ Google::Apis::FormsV1::VideoItem
An item containing a video.
Corresponds to the JSON property videoItem
913 914 915 |
# File 'lib/google/apis/forms_v1/classes.rb', line 913 def video_item @video_item end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
920 921 922 923 924 925 926 927 928 929 930 |
# File 'lib/google/apis/forms_v1/classes.rb', line 920 def update!(**args) @description = args[:description] if args.key?(:description) @image_item = args[:image_item] if args.key?(:image_item) @item_id = args[:item_id] if args.key?(:item_id) @page_break_item = args[:page_break_item] if args.key?(:page_break_item) @question_group_item = args[:question_group_item] if args.key?(:question_group_item) @question_item = args[:question_item] if args.key?(:question_item) @text_item = args[:text_item] if args.key?(:text_item) @title = args[:title] if args.key?(:title) @video_item = args[:video_item] if args.key?(:video_item) end |