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.



931
932
933
# File 'lib/google/apis/forms_v1/classes.rb', line 931

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

Instance Attribute Details

#descriptionString

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

Returns:

  • (String)


887
888
889
# File 'lib/google/apis/forms_v1/classes.rb', line 887

def description
  @description
end

#image_itemGoogle::Apis::FormsV1::ImageItem

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



892
893
894
# File 'lib/google/apis/forms_v1/classes.rb', line 892

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)


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

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



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

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



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

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



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

def question_item
  @question_item
end

#text_itemGoogle::Apis::FormsV1::TextItem

A text item. Corresponds to the JSON property textItem



919
920
921
# File 'lib/google/apis/forms_v1/classes.rb', line 919

def text_item
  @text_item
end

#titleString

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

Returns:

  • (String)


924
925
926
# File 'lib/google/apis/forms_v1/classes.rb', line 924

def title
  @title
end

#video_itemGoogle::Apis::FormsV1::VideoItem

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



929
930
931
# File 'lib/google/apis/forms_v1/classes.rb', line 929

def video_item
  @video_item
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



936
937
938
939
940
941
942
943
944
945
946
# File 'lib/google/apis/forms_v1/classes.rb', line 936

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