Class: Google::Apis::WorkspaceeventsV1::WorkspaceEventsService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/workspaceevents_v1/service.rb

Overview

Google Workspace Events API

The Google Workspace Events API lets you subscribe to events and manage change notifications across Google Workspace applications.

Examples:

require 'google/apis/workspaceevents_v1'

Workspaceevents = Google::Apis::WorkspaceeventsV1 # Alias the module
service = Workspaceevents::WorkspaceEventsService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://workspaceevents.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeWorkspaceEventsService

Returns a new instance of WorkspaceEventsService.



48
49
50
51
52
53
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 48

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-workspaceevents_v1',
        client_version: Google::Apis::WorkspaceeventsV1::GEM_VERSION)
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



41
42
43
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 41

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.



46
47
48
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 46

def quota_user
  @quota_user
end

Instance Method Details

#cancel_task(name, cancel_task_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::Task

Cancel a task from the agent. If supported one should expect no more task updates for the task.

Parameters:

  • name (String)

    The resource name of the task to cancel. Format: tasks/task_id

  • cancel_task_request_object (Google::Apis::WorkspaceeventsV1::CancelTaskRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



445
446
447
448
449
450
451
452
453
454
455
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 445

def cancel_task(name, cancel_task_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:cancel', options)
  command.request_representation = Google::Apis::WorkspaceeventsV1::CancelTaskRequest::Representation
  command.request_object = cancel_task_request_object
  command.response_representation = Google::Apis::WorkspaceeventsV1::Task::Representation
  command.response_class = Google::Apis::WorkspaceeventsV1::Task
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_subscription(subscription_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::Operation

Creates a Google Workspace subscription. To learn how to use this method, see Create a Google Workspace subscription. For a subscription on a Chat target resource, you can create a subscription as: - A Chat app subscribing to space events where the app is a member by specifying an authorization scope that begins with chat.app and getting one-time administrator approval. To learn more, see Authorize as a Chat app with administrator approval. - Developer Preview: A Chat app subscribing to all events in a Google Workspace organization by specifying an authorization scope that begins with chat.app.all and obtaining one-time administrator approval. To learn more, see Subscribe to all Google Chat events in a Workspace organization . - A user by specifying an authorization scope that doesn't include app in its name. To learn more, see Authorize as a Chat user.

Parameters:

  • subscription_object (Google::Apis::WorkspaceeventsV1::Subscription) (defaults to: nil)
  • validate_only (Boolean) (defaults to: nil)

    Optional. If set to true, validates and previews the request, but doesn't create the subscription.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



156
157
158
159
160
161
162
163
164
165
166
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 156

def create_subscription(subscription_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/subscriptions', options)
  command.request_representation = Google::Apis::WorkspaceeventsV1::Subscription::Representation
  command.request_object = subscription_object
  command.response_representation = Google::Apis::WorkspaceeventsV1::Operation::Representation
  command.response_class = Google::Apis::WorkspaceeventsV1::Operation
  command.query['validateOnly'] = validate_only unless validate_only.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_task_push_notification_config(parent, task_push_notification_config_object = nil, config_id: nil, tenant: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::TaskPushNotificationConfig

Set a push notification config for a task.

Parameters:

  • parent (String)

    Required. The parent task resource for this config. Format: tasks/task_id

  • task_push_notification_config_object (Google::Apis::WorkspaceeventsV1::TaskPushNotificationConfig) (defaults to: nil)
  • config_id (String) (defaults to: nil)

    Required. The ID for the new config.

  • tenant (String) (defaults to: nil)

    Optional tenant, provided as a path parameter. Experimental, might still change for 1.0 release.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



557
558
559
560
561
562
563
564
565
566
567
568
569
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 557

def create_task_push_notification_config(parent, task_push_notification_config_object = nil, config_id: nil, tenant: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+parent}', options)
  command.request_representation = Google::Apis::WorkspaceeventsV1::TaskPushNotificationConfig::Representation
  command.request_object = task_push_notification_config_object
  command.response_representation = Google::Apis::WorkspaceeventsV1::TaskPushNotificationConfig::Representation
  command.response_class = Google::Apis::WorkspaceeventsV1::TaskPushNotificationConfig
  command.params['parent'] = parent unless parent.nil?
  command.query['configId'] = config_id unless config_id.nil?
  command.query['tenant'] = tenant unless tenant.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_subscription(name, allow_missing: nil, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::Operation

Deletes a Google Workspace subscription. To learn how to use this method, see Delete a Google Workspace subscription.

Parameters:

  • name (String)

    Required. Resource name of the subscription to delete. Format: subscriptions/ subscription``

  • allow_missing (Boolean) (defaults to: nil)

    Optional. If set to true and the subscription isn't found, the request succeeds but doesn't delete the subscription.

  • etag (String) (defaults to: nil)

    Optional. Etag of the subscription. If present, it must match with the server' s etag. Otherwise, request fails with the status ABORTED.

  • validate_only (Boolean) (defaults to: nil)

    Optional. If set to true, validates and previews the request, but doesn't delete the subscription.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 200

def delete_subscription(name, allow_missing: nil, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::WorkspaceeventsV1::Operation::Representation
  command.response_class = Google::Apis::WorkspaceeventsV1::Operation
  command.params['name'] = name unless name.nil?
  command.query['allowMissing'] = allow_missing unless allow_missing.nil?
  command.query['etag'] = etag unless etag.nil?
  command.query['validateOnly'] = validate_only unless validate_only.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_task_push_notification_config(name, tenant: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::Empty

Delete a push notification config for a task.

Parameters:

  • name (String)

    The resource name of the config to delete. Format: tasks/task_id/ pushNotificationConfigs/config_id

  • tenant (String) (defaults to: nil)

    Optional tenant, provided as a path parameter. Experimental, might still change for 1.0 release.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



595
596
597
598
599
600
601
602
603
604
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 595

def delete_task_push_notification_config(name, tenant: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::WorkspaceeventsV1::Empty::Representation
  command.response_class = Google::Apis::WorkspaceeventsV1::Empty
  command.params['name'] = name unless name.nil?
  command.query['tenant'] = tenant unless tenant.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_operation(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::Operation

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters:

  • name (String)

    The name of the operation resource.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



107
108
109
110
111
112
113
114
115
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 107

def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::WorkspaceeventsV1::Operation::Representation
  command.response_class = Google::Apis::WorkspaceeventsV1::Operation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_subscription(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::Subscription

Gets details about a Google Workspace subscription. To learn how to use this method, see Get details about a Google Workspace subscription.

Parameters:

  • name (String)

    Required. Resource name of the subscription. Format: subscriptions/ subscription``

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



236
237
238
239
240
241
242
243
244
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 236

def get_subscription(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::WorkspaceeventsV1::Subscription::Representation
  command.response_class = Google::Apis::WorkspaceeventsV1::Subscription
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_task(name, history_length: nil, tenant: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::Task

Get the current state of a task from the agent.

Parameters:

  • name (String)

    Required. The resource name of the task. Format: tasks/task_id

  • history_length (Fixnum) (defaults to: nil)

    The number of most recent messages from the task's history to retrieve.

  • tenant (String) (defaults to: nil)

    Optional tenant, provided as a path parameter. Experimental, might still change for 1.0 release.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



482
483
484
485
486
487
488
489
490
491
492
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 482

def get_task(name, history_length: nil, tenant: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::WorkspaceeventsV1::Task::Representation
  command.response_class = Google::Apis::WorkspaceeventsV1::Task
  command.params['name'] = name unless name.nil?
  command.query['historyLength'] = history_length unless history_length.nil?
  command.query['tenant'] = tenant unless tenant.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_task_push_notification_config(name, tenant: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::TaskPushNotificationConfig

Get a push notification config for a task.

Parameters:

  • name (String)

    The resource name of the config to retrieve. Format: tasks/task_id/ pushNotificationConfigs/config_id

  • tenant (String) (defaults to: nil)

    Optional tenant, provided as a path parameter. Experimental, might still change for 1.0 release.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



630
631
632
633
634
635
636
637
638
639
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 630

def get_task_push_notification_config(name, tenant: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::WorkspaceeventsV1::TaskPushNotificationConfig::Representation
  command.response_class = Google::Apis::WorkspaceeventsV1::TaskPushNotificationConfig
  command.params['name'] = name unless name.nil?
  command.query['tenant'] = tenant unless tenant.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_subscriptions(filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::ListSubscriptionsResponse

Lists Google Workspace subscriptions. To learn how to use this method, see List Google Workspace subscriptions.

Parameters:

  • filter (String) (defaults to: nil)

    Required. A query filter. You can filter subscriptions by event type ( event_types) and target resource (target_resource). You must specify at least one event type in your query. To filter for multiple event types, use the OR operator. To filter by both event type and target resource, use the AND operator and specify the full resource name, such as //chat.googleapis. com/spaces/space. For example, the following queries are valid: event_types:"google.workspace.chat.membership.v1.updated" OR event_types:" google.workspace.chat.message.v1.created" event_types:"google.workspace.chat. message.v1.created" AND target_resource="//chat.googleapis.com/spaces/space" ( event_types:"google.workspace.chat.membership.v1.updated" OR event_types:" google.workspace.chat.message.v1.created" ) AND target_resource="//chat. googleapis.com/spaces/space"The following query is available in [ Developer Preview](https://developers.google.com/workspace/preview): event_types:"google.workspace.chat.message.v1.created" AND target_resource="// admin.googleapis.com/customers/my_customer"`The server rejects invalid queries with anINVALID_ARGUMENT` error.

  • page_size (Fixnum) (defaults to: nil)

    Optional. The maximum number of subscriptions to return. The service might return fewer than this value. If unspecified or set to 0, up to 50 subscriptions are returned. The maximum value is 100. If you specify a value more than 100, the system only returns 100 subscriptions.

  • page_token (String) (defaults to: nil)

    Optional. A page token, received from a previous list subscriptions call. Provide this parameter to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value might lead to unexpected results.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



293
294
295
296
297
298
299
300
301
302
303
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 293

def list_subscriptions(filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/subscriptions', options)
  command.response_representation = Google::Apis::WorkspaceeventsV1::ListSubscriptionsResponse::Representation
  command.response_class = Google::Apis::WorkspaceeventsV1::ListSubscriptionsResponse
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_task_push_notification_configs(parent, page_size: nil, page_token: nil, tenant: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::ListTaskPushNotificationConfigResponse

Get a list of push notifications configured for a task.

Parameters:

  • parent (String)

    The parent task resource. Format: tasks/task_id

  • page_size (Fixnum) (defaults to: nil)

    For AIP-158 these fields are present. Usually not used/needed. The maximum number of configurations to return. If unspecified, all configs will be returned.

  • page_token (String) (defaults to: nil)

    A page token received from a previous ListTaskPushNotificationConfigRequest call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListTaskPushNotificationConfigRequest must match the call that provided the page token.

  • tenant (String) (defaults to: nil)

    Optional tenant, provided as a path parameter. Experimental, might still change for 1.0 release.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



673
674
675
676
677
678
679
680
681
682
683
684
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 673

def list_task_push_notification_configs(parent, page_size: nil, page_token: nil, tenant: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/pushNotificationConfigs', options)
  command.response_representation = Google::Apis::WorkspaceeventsV1::ListTaskPushNotificationConfigResponse::Representation
  command.response_class = Google::Apis::WorkspaceeventsV1::ListTaskPushNotificationConfigResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['tenant'] = tenant unless tenant.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_subscription(name, subscription_object = nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::Operation

Updates or renews a Google Workspace subscription. To learn how to use this method, see Update or renew a Google Workspace subscription. For a subscription on a Chat target resource, you can update a subscription as: - A Chat app subscribing to space events where the app is a member by specifying an authorization scope that begins with chat.app and getting one-time administrator approval. To learn more, see Authorize as a Chat app with administrator approval. - Developer Preview: A Chat app subscribing to all events in a Google Workspace organization by specifying an authorization scope that begins with chat.app.all and getting one-time administrator approval. To learn more, see Subscribe to all Google Chat events in a Workspace organization . - A user by specifying an authorization scope that doesn't include app in its name. To learn more, see Authorize as a Chat user.

Parameters:

  • name (String)

    Identifier. Resource name of the subscription. Format: subscriptions/ subscription``

  • subscription_object (Google::Apis::WorkspaceeventsV1::Subscription) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Optional. The field to update. If omitted, updates any fields included in the request. You can update one of the following fields in a subscription: * expire_time: The timestamp when the subscription expires. * ttl: The time- to-live (TTL) or duration of the subscription. * event_types: The list of event types to receive about the target resource. When using the * wildcard ( equivalent to PUT), omitted fields are set to empty values and rejected if they're invalid.

  • validate_only (Boolean) (defaults to: nil)

    Optional. If set to true, validates and previews the request, but doesn't update the subscription.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



355
356
357
358
359
360
361
362
363
364
365
366
367
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 355

def patch_subscription(name, subscription_object = nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1/{+name}', options)
  command.request_representation = Google::Apis::WorkspaceeventsV1::Subscription::Representation
  command.request_object = subscription_object
  command.response_representation = Google::Apis::WorkspaceeventsV1::Operation::Representation
  command.response_class = Google::Apis::WorkspaceeventsV1::Operation
  command.params['name'] = name unless name.nil?
  command.query['updateMask'] = update_mask unless update_mask.nil?
  command.query['validateOnly'] = validate_only unless validate_only.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#reactivate_subscription(name, reactivate_subscription_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::Operation

Reactivates a suspended Google Workspace subscription. This method resets your subscription's State field to ACTIVE. Before you use this method, you must fix the error that suspended the subscription. This method will ignore or reject any subscription that isn't currently in a suspended state. To learn how to use this method, see Reactivate a Google Workspace subscription. For a subscription on a Chat target resource, you can reactivate a subscription as: - A Chat app subscribing to space events where the app is a member by specifying an authorization scope that begins with chat.app and getting one-time administrator approval. To learn more, see Authorize as a Chat app with administrator approval. - Developer Preview: A Chat app subscribing to all events in a Google Workspace organization by specifying an authorization scope that begins with chat.app.all and getting one-time administrator approval. To learn more, see Subscribe to all Google Chat events in a Workspace organization . - A user by specifying an authorization scope that doesn't include app in its name. To learn more, see Authorize as a Chat user.

Parameters:

  • name (String)

    Required. Resource name of the subscription. Format: subscriptions/ subscription``

  • reactivate_subscription_request_object (Google::Apis::WorkspaceeventsV1::ReactivateSubscriptionRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



411
412
413
414
415
416
417
418
419
420
421
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 411

def reactivate_subscription(name, reactivate_subscription_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:reactivate', options)
  command.request_representation = Google::Apis::WorkspaceeventsV1::ReactivateSubscriptionRequest::Representation
  command.request_object = reactivate_subscription_request_object
  command.response_representation = Google::Apis::WorkspaceeventsV1::Operation::Representation
  command.response_class = Google::Apis::WorkspaceeventsV1::Operation
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#stream_message(send_message_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::StreamResponse

SendStreamingMessage is a streaming call that will return a stream of task update events until the Task is in an interrupted or terminal state.

Parameters:

  • send_message_request_object (Google::Apis::WorkspaceeventsV1::SendMessageRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



75
76
77
78
79
80
81
82
83
84
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 75

def stream_message(send_message_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/message:stream', options)
  command.request_representation = Google::Apis::WorkspaceeventsV1::SendMessageRequest::Representation
  command.request_object = send_message_request_object
  command.response_representation = Google::Apis::WorkspaceeventsV1::StreamResponse::Representation
  command.response_class = Google::Apis::WorkspaceeventsV1::StreamResponse
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#subscribe_task(name, tenant: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::StreamResponse

TaskSubscription is a streaming call that will return a stream of task update events. This attaches the stream to an existing in process task. If the task is complete the stream will return the completed task (like GetTask) and close the stream.

Parameters:

  • name (String)

    The resource name of the task to subscribe to. Format: tasks/task_id

  • tenant (String) (defaults to: nil)

    Optional tenant, provided as a path parameter. Experimental, might still change for 1.0 release.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



520
521
522
523
524
525
526
527
528
529
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 520

def subscribe_task(name, tenant: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}:subscribe', options)
  command.response_representation = Google::Apis::WorkspaceeventsV1::StreamResponse::Representation
  command.response_class = Google::Apis::WorkspaceeventsV1::StreamResponse
  command.params['name'] = name unless name.nil?
  command.query['tenant'] = tenant unless tenant.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end