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.



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

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

Instance Attribute Details

#descriptionString

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

Returns:

  • (String)


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

def description
  @description
end

#image_itemGoogle::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_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)


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

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



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

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



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

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



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

def question_item
  @question_item
end

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

#titleString

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

Returns:

  • (String)


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

def title
  @title
end

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