Class: Google::Apis::FormsV1::Watch
- Inherits:
-
Object
- Object
- Google::Apis::FormsV1::Watch
- 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 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
Instance Attribute Summary collapse
-
#create_time ⇒ String
Output only.
-
#error_type ⇒ String
Output only.
-
#event_type ⇒ String
Required.
-
#expire_time ⇒ String
Output only.
-
#id ⇒ String
Output only.
-
#state ⇒ String
Output only.
-
#target ⇒ Google::Apis::FormsV1::WatchTarget
The target for notification delivery.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Watch
constructor
A new instance of Watch.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Watch
Returns a new instance of Watch.
1747 1748 1749 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1747 def initialize(**args) update!(**args) end |
Instance Attribute Details
#create_time ⇒ String
Output only. Timestamp of when this was created.
Corresponds to the JSON property createTime
1711 1712 1713 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1711 def create_time @create_time end |
#error_type ⇒ String
Output only. The most recent error type for an attempted delivery. To begin
watching the form again a call can be made to watches.renew which also clears
this error information.
Corresponds to the JSON property errorType
1718 1719 1720 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1718 def error_type @error_type end |
#event_type ⇒ String
Required. Which event type to watch for.
Corresponds to the JSON property eventType
1723 1724 1725 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1723 def event_type @event_type end |
#expire_time ⇒ String
Output only. Timestamp for when this will expire. Each watches.renew call
resets this to seven days in the future.
Corresponds to the JSON property expireTime
1729 1730 1731 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1729 def expire_time @expire_time end |
#id ⇒ String
Output only. The ID of this watch. See notes on CreateWatchRequest.watch_id.
Corresponds to the JSON property id
1734 1735 1736 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1734 def id @id end |
#state ⇒ String
Output only. The current state of the watch. Additional details about
suspended watches can be found by checking the error_type
.
Corresponds to the JSON property state
1740 1741 1742 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1740 def state @state end |
#target ⇒ Google::Apis::FormsV1::WatchTarget
The target for notification delivery.
Corresponds to the JSON property target
1745 1746 1747 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1745 def target @target end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1752 1753 1754 1755 1756 1757 1758 1759 1760 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1752 def update!(**args) @create_time = args[:create_time] if args.key?(:create_time) @error_type = args[:error_type] if args.key?(:error_type) @event_type = args[:event_type] if args.key?(:event_type) @expire_time = args[:expire_time] if args.key?(:expire_time) @id = args[:id] if args.key?(:id) @state = args[:state] if args.key?(:state) @target = args[:target] if args.key?(:target) end |