Class: Google::Apis::FormsV1::WriteControl

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

Provides control over how write requests are executed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ WriteControl

Returns a new instance of WriteControl.



1808
1809
1810
# File 'lib/google/apis/forms_v1/classes.rb', line 1808

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

Instance Attribute Details

#required_revision_idString

The revision ID of the form that the write request is applied to. If this is not the latest revision of the form, the request is not processed and returns a 400 bad request error. Corresponds to the JSON property requiredRevisionId

Returns:

  • (String)


1791
1792
1793
# File 'lib/google/apis/forms_v1/classes.rb', line 1791

def required_revision_id
  @required_revision_id
end

#target_revision_idString

The target revision ID of the form that the write request is applied to. If changes have occurred after this revision, the changes in this update request are transformed against those changes. This results in a new revision of the form that incorporates both the changes in the request and the intervening changes, with the server resolving conflicting changes. The target revision ID may only be used to write to recent versions of a form. If the target revision is too far behind the latest revision, the request is not processed and returns a 400 (Bad Request Error). The request may be retried after reading the latest version of the form. In most cases a target revision ID remains valid for several minutes after it is read, but for frequently-edited forms this window may be shorter. Corresponds to the JSON property targetRevisionId

Returns:

  • (String)


1806
1807
1808
# File 'lib/google/apis/forms_v1/classes.rb', line 1806

def target_revision_id
  @target_revision_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1813
1814
1815
1816
# File 'lib/google/apis/forms_v1/classes.rb', line 1813

def update!(**args)
  @required_revision_id = args[:required_revision_id] if args.key?(:required_revision_id)
  @target_revision_id = args[:target_revision_id] if args.key?(:target_revision_id)
end