Class: Google::Apis::FormsV1::Item

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

A single item of the form. kind defines which kind of item it is.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Item

Returns a new instance of Item.



916
917
918
# File 'lib/google/apis/forms_v1/classes.rb', line 916

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#descriptionString

The description of the item. Corresponds to the JSON property description

Returns:

  • (String)


872
873
874
# File 'lib/google/apis/forms_v1/classes.rb', line 872

def description
  @description
end

#image_itemGoogle::Apis::FormsV1::ImageItem

An item containing an image. Corresponds to the JSON property imageItem



877
878
879
# File 'lib/google/apis/forms_v1/classes.rb', line 877

def image_item
  @image_item
end

#item_idString

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

Returns:

  • (String)


883
884
885
# File 'lib/google/apis/forms_v1/classes.rb', line 883

def item_id
  @item_id
end

#page_break_itemGoogle::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



889
890
891
# File 'lib/google/apis/forms_v1/classes.rb', line 889

def page_break_item
  @page_break_item
end

#question_group_itemGoogle::Apis::FormsV1::QuestionGroupItem

Defines a question that comprises multiple questions grouped together. Corresponds to the JSON property questionGroupItem



894
895
896
# File 'lib/google/apis/forms_v1/classes.rb', line 894

def question_group_item
  @question_group_item
end

#question_itemGoogle::Apis::FormsV1::QuestionItem

A form item containing a single question. Corresponds to the JSON property questionItem



899
900
901
# File 'lib/google/apis/forms_v1/classes.rb', line 899

def question_item
  @question_item
end

#text_itemGoogle::Apis::FormsV1::TextItem

A text item. Corresponds to the JSON property textItem



904
905
906
# File 'lib/google/apis/forms_v1/classes.rb', line 904

def text_item
  @text_item
end

#titleString

The title of the item. Corresponds to the JSON property title

Returns:

  • (String)


909
910
911
# File 'lib/google/apis/forms_v1/classes.rb', line 909

def title
  @title
end

#video_itemGoogle::Apis::FormsV1::VideoItem

An item containing a video. Corresponds to the JSON property videoItem



914
915
916
# File 'lib/google/apis/forms_v1/classes.rb', line 914

def video_item
  @video_item
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



921
922
923
924
925
926
927
928
929
930
931
# File 'lib/google/apis/forms_v1/classes.rb', line 921

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