Class: Google::Apis::FormsV1::CreateWatchRequest
- Inherits:
-
Object
- Object
- Google::Apis::FormsV1::CreateWatchRequest
- 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
Create a new watch.
Instance Attribute Summary collapse
-
#watch ⇒ Google::Apis::FormsV1::Watch
A watch for events for a form.
-
#watch_id ⇒ String
The ID to use for the watch.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CreateWatchRequest
constructor
A new instance of CreateWatchRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ CreateWatchRequest
Returns a new instance of CreateWatchRequest.
304 305 306 |
# File 'lib/google/apis/forms_v1/classes.rb', line 304 def initialize(**args) update!(**args) end |
Instance Attribute Details
#watch ⇒ Google::Apis::FormsV1::Watch
A watch for events for a form. When the designated event happens, a
notification will be published to the specified target. The notification's
attributes will include a formId
key that has the ID of the watched form and
an eventType
key that has the string of the type. Messages are sent with at-
least-once delivery and are only dropped in extraordinary circumstances.
Typically all notifications should be reliably delivered within a few seconds;
however, in some situations notifications may be delayed. A watch expires
seven days after it is created unless it is renewed with watches.renew
Corresponds to the JSON property watch
295 296 297 |
# File 'lib/google/apis/forms_v1/classes.rb', line 295 def watch @watch end |
#watch_id ⇒ String
The ID to use for the watch. If specified, the ID must not already be in use.
If not specified, an ID is generated. This value should be 4-63 characters,
and valid characters are /a-z-/.
Corresponds to the JSON property watchId
302 303 304 |
# File 'lib/google/apis/forms_v1/classes.rb', line 302 def watch_id @watch_id end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
309 310 311 312 |
# File 'lib/google/apis/forms_v1/classes.rb', line 309 def update!(**args) @watch = args[:watch] if args.key?(:watch) @watch_id = args[:watch_id] if args.key?(:watch_id) end |