Class: Google::Apis::FormsV1::Form
- Inherits:
-
Object
- Object
- Google::Apis::FormsV1::Form
- 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 Google Forms document. A form is created in Drive, and deleting a form or changing its access protections is done via the Drive API.
Instance Attribute Summary collapse
-
#form_id ⇒ String
Output only.
-
#info ⇒ Google::Apis::FormsV1::Info
The general information for a form.
-
#items ⇒ Array<Google::Apis::FormsV1::Item>
Required.
-
#linked_sheet_id ⇒ String
Output only.
-
#publish_settings ⇒ Google::Apis::FormsV1::PublishSettings
The publishing settings of a form.
-
#responder_uri ⇒ String
Output only.
-
#revision_id ⇒ String
Output only.
-
#settings ⇒ Google::Apis::FormsV1::FormSettings
A form's settings.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Form
constructor
A new instance of Form.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Form
Returns a new instance of Form.
577 578 579 |
# File 'lib/google/apis/forms_v1/classes.rb', line 577 def initialize(**args) update!(**args) end |
Instance Attribute Details
#form_id ⇒ String
Output only. The form ID.
Corresponds to the JSON property formId
526 527 528 |
# File 'lib/google/apis/forms_v1/classes.rb', line 526 def form_id @form_id end |
#info ⇒ Google::Apis::FormsV1::Info
The general information for a form.
Corresponds to the JSON property info
531 532 533 |
# File 'lib/google/apis/forms_v1/classes.rb', line 531 def info @info end |
#items ⇒ Array<Google::Apis::FormsV1::Item>
Required. A list of the form's items, which can include section headers,
questions, embedded media, etc.
Corresponds to the JSON property items
537 538 539 |
# File 'lib/google/apis/forms_v1/classes.rb', line 537 def items @items end |
#linked_sheet_id ⇒ String
Output only. The ID of the linked Google Sheet which is accumulating responses
from this Form (if such a Sheet exists).
Corresponds to the JSON property linkedSheetId
543 544 545 |
# File 'lib/google/apis/forms_v1/classes.rb', line 543 def linked_sheet_id @linked_sheet_id end |
#publish_settings ⇒ Google::Apis::FormsV1::PublishSettings
The publishing settings of a form.
Corresponds to the JSON property publishSettings
548 549 550 |
# File 'lib/google/apis/forms_v1/classes.rb', line 548 def publish_settings @publish_settings end |
#responder_uri ⇒ String
Output only. The form URI to share with responders. This opens a page that
allows the user to submit responses but not edit the questions. For forms that
have publish_settings value set, this is the published form URI.
Corresponds to the JSON property responderUri
555 556 557 |
# File 'lib/google/apis/forms_v1/classes.rb', line 555 def responder_uri @responder_uri end |
#revision_id ⇒ String
Output only. The revision ID of the form. Used in the WriteControl in update
requests to identify the revision on which the changes are based. The format
of the revision ID may change over time, so it should be treated opaquely. A
returned revision ID is only guaranteed to be valid for 24 hours after it has
been returned and cannot be shared across users. If the revision ID is
unchanged between calls, then the form content has not changed. Conversely,
a changed ID (for the same form and user) usually means the form content has
been updated; however, a changed ID can also be due to internal factors such
as ID format changes. Form content excludes form metadata, including: *
sharing settings (who has access to the form) * publish_settings (if the form
supports publishing and if it is published)
Corresponds to the JSON property revisionId
570 571 572 |
# File 'lib/google/apis/forms_v1/classes.rb', line 570 def revision_id @revision_id end |
#settings ⇒ Google::Apis::FormsV1::FormSettings
A form's settings.
Corresponds to the JSON property settings
575 576 577 |
# File 'lib/google/apis/forms_v1/classes.rb', line 575 def settings @settings end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
582 583 584 585 586 587 588 589 590 591 |
# File 'lib/google/apis/forms_v1/classes.rb', line 582 def update!(**args) @form_id = args[:form_id] if args.key?(:form_id) @info = args[:info] if args.key?(:info) @items = args[:items] if args.key?(:items) @linked_sheet_id = args[:linked_sheet_id] if args.key?(:linked_sheet_id) @publish_settings = args[:publish_settings] if args.key?(:publish_settings) @responder_uri = args[:responder_uri] if args.key?(:responder_uri) @revision_id = args[:revision_id] if args.key?(:revision_id) @settings = args[:settings] if args.key?(:settings) end |