Class: Google::Apis::WorkspaceeventsV1::WorkspaceEventsService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::WorkspaceeventsV1::WorkspaceEventsService
- 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.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://workspaceevents.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#create_subscription(subscription_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::Operation
Developer Preview: Creates a Google Workspace subscription.
-
#delete_subscription(name, allow_missing: nil, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::Operation
Developer Preview: Deletes a Google Workspace subscription.
-
#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.
-
#get_subscription(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::Subscription
Developer Preview: Gets details about a Google Workspace subscription.
-
#initialize ⇒ WorkspaceEventsService
constructor
A new instance of WorkspaceEventsService.
-
#list_subscriptions(filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::ListSubscriptionsResponse
Developer Preview: Lists Google Workspace subscriptions.
-
#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
Developer Preview: Updates or renews a Google Workspace subscription.
-
#reactivate_subscription(name, reactivate_subscription_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::Operation
Developer Preview: Reactivates a suspended Google Workspace subscription.
Constructor Details
#initialize ⇒ WorkspaceEventsService
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
#key ⇒ String
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.
41 42 43 |
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 41 def key @key end |
#quota_user ⇒ String
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.
46 47 48 |
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 46 def quota_user @quota_user end |
Instance Method Details
#create_subscription(subscription_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::Operation
Developer Preview: Creates a Google Workspace subscription. To learn how to use this method, see Create a Google Workspace subscription.
111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 111 def create_subscription(subscription_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/subscriptions', ) 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 |
#delete_subscription(name, allow_missing: nil, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::Operation
Developer Preview: Deletes a Google Workspace subscription. To learn how to use this method, see Delete a Google Workspace subscription.
156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 156 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}', ) 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 |
#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.
76 77 78 79 80 81 82 83 84 |
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 76 def get_operation(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) 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
Developer Preview: Gets details about a Google Workspace subscription. To learn how to use this method, see Get details about a Google Workspace subscription.
193 194 195 196 197 198 199 200 201 |
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 193 def get_subscription(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) 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 |
#list_subscriptions(filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WorkspaceeventsV1::ListSubscriptionsResponse
Developer Preview: Lists Google Workspace subscriptions. To learn how to use this method, see List Google Workspace subscriptions.
248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 248 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', ) 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 |
#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
Developer Preview: Updates or renews a Google Workspace subscription. To learn how to use this method, see Update or renew a Google Workspace subscription.
296 297 298 299 300 301 302 303 304 305 306 307 308 |
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 296 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}', ) 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
Developer Preview:
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. To learn how to use this method,
see Reactivate a Google Workspace subscription.
337 338 339 340 341 342 343 344 345 346 347 |
# File 'lib/google/apis/workspaceevents_v1/service.rb', line 337 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', ) 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 |