Class: Google::Apis::WorkspaceeventsV1::Subscription
- Inherits:
-
Object
- Object
- Google::Apis::WorkspaceeventsV1::Subscription
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/workspaceevents_v1/classes.rb,
lib/google/apis/workspaceevents_v1/representations.rb,
lib/google/apis/workspaceevents_v1/representations.rb
Overview
Developer Preview. A subscription to receive events about a Google Workspace resource. To learn more about subscriptions, see the Google Workspace Events API overview.
Instance Attribute Summary collapse
-
#authority ⇒ String
Output only.
-
#create_time ⇒ String
Output only.
-
#etag ⇒ String
Optional.
-
#event_types ⇒ Array<String>
Required.
-
#expire_time ⇒ String
Non-empty default.
-
#name ⇒ String
Identifier.
-
#notification_endpoint ⇒ Google::Apis::WorkspaceeventsV1::NotificationEndpoint
The endpoint where the subscription delivers events.
-
#payload_options ⇒ Google::Apis::WorkspaceeventsV1::PayloadOptions
Options about what data to include in the event payload.
-
#reconciling ⇒ Boolean
(also: #reconciling?)
Output only.
-
#state ⇒ String
Output only.
-
#suspension_reason ⇒ String
Output only.
-
#target_resource ⇒ String
Required.
-
#ttl ⇒ String
Input only.
-
#uid ⇒ String
Output only.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Subscription
constructor
A new instance of Subscription.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Subscription
Returns a new instance of Subscription.
335 336 337 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 335 def initialize(**args) update!(**args) end |
Instance Attribute Details
#authority ⇒ String
Output only. The user who authorized the creation of the subscription. Format:
users/
userFor Google Workspace users, the
user`value is the [
user.id
](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users#
User.FIELDS.ids) field from the Directory API.
Corresponds to the JSON property
authority`
238 239 240 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 238 def @authority end |
#create_time ⇒ String
Output only. The time when the subscription is created.
Corresponds to the JSON property createTime
243 244 245 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 243 def create_time @create_time end |
#etag ⇒ String
Optional. This checksum is computed by the server based on the value of other
fields, and might be sent on update requests to ensure the client has an up-to-
date value before proceeding.
Corresponds to the JSON property etag
250 251 252 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 250 def etag @etag end |
#event_types ⇒ Array<String>
Required. Unordered list. Input for creating a subscription. Otherwise, output
only. One or more types of events to receive about the target resource.
Formatted according to the CloudEvents specification. The supported event
types depend on the target resource of your subscription. For details, see
Supported Google Workspace events. By default, you also receive events about the
lifecycle of your subscription. You don't need to specify lifecycle events
for this field. If you specify an event type that doesn't exist for the target
resource, the request returns an HTTP 400 Bad Request
status code.
Corresponds to the JSON property eventTypes
264 265 266 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 264 def event_types @event_types end |
#expire_time ⇒ String
Non-empty default. The timestamp in UTC when the subscription expires. Always
displayed on output, regardless of what was used on input.
Corresponds to the JSON property expireTime
270 271 272 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 270 def expire_time @expire_time end |
#name ⇒ String
Identifier. Resource name of the subscription. Format: subscriptions/
subscription`
Corresponds to the JSON property
name`
276 277 278 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 276 def name @name end |
#notification_endpoint ⇒ Google::Apis::WorkspaceeventsV1::NotificationEndpoint
The endpoint where the subscription delivers events.
Corresponds to the JSON property notificationEndpoint
281 282 283 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 281 def notification_endpoint @notification_endpoint end |
#payload_options ⇒ Google::Apis::WorkspaceeventsV1::PayloadOptions
Options about what data to include in the event payload. Only supported for
Google Chat events.
Corresponds to the JSON property payloadOptions
287 288 289 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 287 def @payload_options end |
#reconciling ⇒ Boolean Also known as: reconciling?
Output only. If true
, the subscription is in the process of being updated.
Corresponds to the JSON property reconciling
292 293 294 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 292 def reconciling @reconciling end |
#state ⇒ String
Output only. The state of the subscription. Determines whether the
subscription can receive events and deliver them to the notification endpoint.
Corresponds to the JSON property state
299 300 301 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 299 def state @state end |
#suspension_reason ⇒ String
Output only. The error that suspended the subscription. To reactivate the
subscription, resolve the error and call the ReactivateSubscription
method.
Corresponds to the JSON property suspensionReason
305 306 307 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 305 def suspension_reason @suspension_reason end |
#target_resource ⇒ String
Required. Immutable. The Google Workspace resource that's monitored for events,
formatted as the full resource name. To learn about target resources and the events that they
support, see Supported Google Workspace events. A user can only authorize your app to
create one subscription for a given target resource. If your app tries to
create another subscription with the same user credentials, the request
returns an ALREADY_EXISTS
error.
Corresponds to the JSON property targetResource
317 318 319 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 317 def target_resource @target_resource end |
#ttl ⇒ String
Input only. The time-to-live (TTL) or duration for the subscription. If
unspecified or set to 0
, uses the maximum possible duration.
Corresponds to the JSON property ttl
323 324 325 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 323 def ttl @ttl end |
#uid ⇒ String
Output only. System-assigned unique identifier for the subscription.
Corresponds to the JSON property uid
328 329 330 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 328 def uid @uid end |
#update_time ⇒ String
Output only. The last time that the subscription is updated.
Corresponds to the JSON property updateTime
333 334 335 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 333 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 340 def update!(**args) @authority = args[:authority] if args.key?(:authority) @create_time = args[:create_time] if args.key?(:create_time) @etag = args[:etag] if args.key?(:etag) @event_types = args[:event_types] if args.key?(:event_types) @expire_time = args[:expire_time] if args.key?(:expire_time) @name = args[:name] if args.key?(:name) @notification_endpoint = args[:notification_endpoint] if args.key?(:notification_endpoint) @payload_options = args[:payload_options] if args.key?(:payload_options) @reconciling = args[:reconciling] if args.key?(:reconciling) @state = args[:state] if args.key?(:state) @suspension_reason = args[:suspension_reason] if args.key?(:suspension_reason) @target_resource = args[:target_resource] if args.key?(:target_resource) @ttl = args[:ttl] if args.key?(:ttl) @uid = args[:uid] if args.key?(:uid) @update_time = args[:update_time] if args.key?(:update_time) end |