google-apps-chat-v1 0.1.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/apps/chat/v1/chat_service/client.rb +334 -10
- data/lib/google/apps/chat/v1/chat_service/credentials.rb +5 -0
- data/lib/google/apps/chat/v1/chat_service/paths.rb +17 -0
- data/lib/google/apps/chat/v1/chat_service/rest/client.rb +320 -10
- data/lib/google/apps/chat/v1/chat_service/rest/service_stub.rb +118 -0
- data/lib/google/apps/chat/v1/version.rb +1 -1
- data/lib/google/chat/v1/chat_service_pb.rb +2 -1
- data/lib/google/chat/v1/chat_service_services_pb.rb +33 -0
- data/lib/google/chat/v1/event_payload_pb.rb +69 -0
- data/lib/google/chat/v1/space_event_pb.rb +52 -0
- data/lib/google/chat/v1/space_pb.rb +3 -1
- data/proto_docs/google/api/client.rb +14 -10
- data/proto_docs/google/api/resource.rb +7 -2
- data/proto_docs/google/chat/v1/attachment.rb +2 -2
- data/proto_docs/google/chat/v1/event_payload.rb +225 -0
- data/proto_docs/google/chat/v1/membership.rb +8 -2
- data/proto_docs/google/chat/v1/space.rb +66 -6
- data/proto_docs/google/chat/v1/space_event.rb +285 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30299bb3cedf11bc28e17fed1d365308fea395089edd0126622b1c08bab7a818
|
4
|
+
data.tar.gz: 906891e727e014312545208d2834fa9c212992635a924e971d800fe488aed2ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd0e8bb14d79e1d22e9956bcac71a96e895a5cf4fe8b2eb4d39ed6b931a7bb4611ae40631f8bc63b75c4ebc6ce89cdaedde89c7d17d74fff5250751f8737ebb8
|
7
|
+
data.tar.gz: f548ae402b40405ae48b378c2e6f81dbcc780702cde3ce7bf3ea5779ff6bec3e9cc1a83dc9f8de8bff07dc9db32745e7ed5e9f7ceb6374bf95c5cd61b6fa39e7
|
@@ -201,6 +201,16 @@ module Google
|
|
201
201
|
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
202
202
|
}
|
203
203
|
|
204
|
+
default_config.rpcs.get_space_event.timeout = 30.0
|
205
|
+
default_config.rpcs.get_space_event.retry_policy = {
|
206
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
207
|
+
}
|
208
|
+
|
209
|
+
default_config.rpcs.list_space_events.timeout = 30.0
|
210
|
+
default_config.rpcs.list_space_events.retry_policy = {
|
211
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
212
|
+
}
|
213
|
+
|
204
214
|
default_config
|
205
215
|
end
|
206
216
|
yield @configure if block_given?
|
@@ -662,16 +672,23 @@ module Google
|
|
662
672
|
#
|
663
673
|
# To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
|
664
674
|
#
|
665
|
-
# To filter by type, set `member.type` to `HUMAN` or `BOT`.
|
675
|
+
# To filter by type, set `member.type` to `HUMAN` or `BOT`. Developer
|
676
|
+
# Preview: You can also filter for `member.type` using the `!=` operator.
|
666
677
|
#
|
667
678
|
# To filter by both role and type, use the `AND` operator. To filter by
|
668
679
|
# either role or type, use the `OR` operator.
|
669
680
|
#
|
681
|
+
# Either `member.type = "HUMAN"` or `member.type != "BOT"` is required
|
682
|
+
# when `use_admin_access` is set to true. Other member type filters will be
|
683
|
+
# rejected.
|
684
|
+
#
|
670
685
|
# For example, the following queries are valid:
|
671
686
|
#
|
672
687
|
# ```
|
673
688
|
# role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
|
674
689
|
# member.type = "HUMAN" AND role = "ROLE_MANAGER"
|
690
|
+
#
|
691
|
+
# member.type != "BOT"
|
675
692
|
# ```
|
676
693
|
#
|
677
694
|
# The following queries are invalid:
|
@@ -681,7 +698,6 @@ module Google
|
|
681
698
|
# role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
|
682
699
|
# ```
|
683
700
|
#
|
684
|
-
#
|
685
701
|
# Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
686
702
|
# error.
|
687
703
|
# @param show_groups [::Boolean]
|
@@ -1249,7 +1265,7 @@ module Google
|
|
1249
1265
|
#
|
1250
1266
|
# @param name [::String]
|
1251
1267
|
# Required. Resource name of the attachment, in the form
|
1252
|
-
# `spaces
|
1268
|
+
# `spaces/{space}/messages/{message}/attachments/{attachment}`.
|
1253
1269
|
#
|
1254
1270
|
# @yield [response, operation] Access the result along with the RPC operation
|
1255
1271
|
# @yieldparam response [::Google::Apps::Chat::V1::Attachment]
|
@@ -1430,6 +1446,10 @@ module Google
|
|
1430
1446
|
# Lists spaces visible to the caller or authenticated user. Group chats
|
1431
1447
|
# and DMs aren't listed until the first message is sent.
|
1432
1448
|
#
|
1449
|
+
# To list all named spaces by Google Workspace organization, use the
|
1450
|
+
# [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search)
|
1451
|
+
# method using Workspace administrator privileges instead.
|
1452
|
+
#
|
1433
1453
|
# @overload list_spaces(request, options = nil)
|
1434
1454
|
# Pass arguments to `list_spaces` via a request object, either of type
|
1435
1455
|
# {::Google::Apps::Chat::V1::ListSpacesRequest} or an equivalent Hash.
|
@@ -1573,7 +1593,7 @@ module Google
|
|
1573
1593
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1574
1594
|
#
|
1575
1595
|
# @param name [::String]
|
1576
|
-
# Required. Resource name of the space, in the form
|
1596
|
+
# Required. Resource name of the space, in the form `spaces/{space}`.
|
1577
1597
|
#
|
1578
1598
|
# Format: `spaces/{space}`
|
1579
1599
|
#
|
@@ -1985,6 +2005,7 @@ module Google
|
|
1985
2005
|
# the display name is optional if the existing space already has the `SPACE`
|
1986
2006
|
# type. Trying to update the space type in other ways results in an invalid
|
1987
2007
|
# argument error).
|
2008
|
+
# `space_type` is not supported with admin access.
|
1988
2009
|
#
|
1989
2010
|
# - `space_details`
|
1990
2011
|
#
|
@@ -1993,12 +2014,27 @@ module Google
|
|
1993
2014
|
# allows users to change their history
|
1994
2015
|
# setting](https://support.google.com/a/answer/7664184).
|
1995
2016
|
# Warning: mutually exclusive with all other field paths.)
|
1996
|
-
#
|
1997
|
-
#
|
1998
|
-
#
|
1999
|
-
#
|
2000
|
-
#
|
2001
|
-
#
|
2017
|
+
# `space_history_state` is not supported with admin access.
|
2018
|
+
#
|
2019
|
+
# - `access_settings.audience` (Supports changing the [access
|
2020
|
+
# setting](https://support.google.com/chat/answer/11971020) of who can
|
2021
|
+
# discover the space, join the space, and preview the messages in space. If
|
2022
|
+
# no audience is specified in the access setting, the space's access setting
|
2023
|
+
# is updated to private. Warning: mutually exclusive with all other field
|
2024
|
+
# paths.)
|
2025
|
+
# `access_settings.audience` is not supported with admin access.
|
2026
|
+
#
|
2027
|
+
# - Developer Preview: Supports changing the [permission
|
2028
|
+
# settings](https://support.google.com/chat/answer/13340792) of a space,
|
2029
|
+
# supported field paths
|
2030
|
+
# include: `permission_settings.manage_members_and_groups`,
|
2031
|
+
# `permission_settings.modify_space_details`,
|
2032
|
+
# `permission_settings.toggle_history`,
|
2033
|
+
# `permission_settings.use_at_mention_all`,
|
2034
|
+
# `permission_settings.manage_apps`, `permission_settings.manage_webhooks`,
|
2035
|
+
# `permission_settings.reply_messages`
|
2036
|
+
# (Warning: mutually exclusive with all other non-permission settings field
|
2037
|
+
# paths). `permission_settings` is not supported with admin access.
|
2002
2038
|
#
|
2003
2039
|
# @yield [response, operation] Access the result along with the RPC operation
|
2004
2040
|
# @yieldparam response [::Google::Apps::Chat::V1::Space]
|
@@ -3376,6 +3412,280 @@ module Google
|
|
3376
3412
|
raise ::Google::Cloud::Error.from_error(e)
|
3377
3413
|
end
|
3378
3414
|
|
3415
|
+
##
|
3416
|
+
# Returns an event from a Google Chat space. The [event
|
3417
|
+
# payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload)
|
3418
|
+
# contains the most recent version of the resource that changed. For example,
|
3419
|
+
# if you request an event about a new message but the message was later
|
3420
|
+
# updated, the server returns the updated `Message` resource in the event
|
3421
|
+
# payload.
|
3422
|
+
#
|
3423
|
+
# Requires [user
|
3424
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
3425
|
+
# To get an event, the authenticated user must be a member of the space.
|
3426
|
+
#
|
3427
|
+
# For an example, see [Get details about an
|
3428
|
+
# event from a Google Chat
|
3429
|
+
# space](https://developers.google.com/workspace/chat/get-space-event).
|
3430
|
+
#
|
3431
|
+
# @overload get_space_event(request, options = nil)
|
3432
|
+
# Pass arguments to `get_space_event` via a request object, either of type
|
3433
|
+
# {::Google::Apps::Chat::V1::GetSpaceEventRequest} or an equivalent Hash.
|
3434
|
+
#
|
3435
|
+
# @param request [::Google::Apps::Chat::V1::GetSpaceEventRequest, ::Hash]
|
3436
|
+
# A request object representing the call parameters. Required. To specify no
|
3437
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3438
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3439
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3440
|
+
#
|
3441
|
+
# @overload get_space_event(name: nil)
|
3442
|
+
# Pass arguments to `get_space_event` via keyword arguments. Note that at
|
3443
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3444
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3445
|
+
#
|
3446
|
+
# @param name [::String]
|
3447
|
+
# Required. The resource name of the space event.
|
3448
|
+
#
|
3449
|
+
# Format: `spaces/{space}/spaceEvents/{spaceEvent}`
|
3450
|
+
#
|
3451
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3452
|
+
# @yieldparam response [::Google::Apps::Chat::V1::SpaceEvent]
|
3453
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3454
|
+
#
|
3455
|
+
# @return [::Google::Apps::Chat::V1::SpaceEvent]
|
3456
|
+
#
|
3457
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3458
|
+
#
|
3459
|
+
# @example Basic example
|
3460
|
+
# require "google/apps/chat/v1"
|
3461
|
+
#
|
3462
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3463
|
+
# client = Google::Apps::Chat::V1::ChatService::Client.new
|
3464
|
+
#
|
3465
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3466
|
+
# request = Google::Apps::Chat::V1::GetSpaceEventRequest.new
|
3467
|
+
#
|
3468
|
+
# # Call the get_space_event method.
|
3469
|
+
# result = client.get_space_event request
|
3470
|
+
#
|
3471
|
+
# # The returned object is of type Google::Apps::Chat::V1::SpaceEvent.
|
3472
|
+
# p result
|
3473
|
+
#
|
3474
|
+
def get_space_event request, options = nil
|
3475
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3476
|
+
|
3477
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::GetSpaceEventRequest
|
3478
|
+
|
3479
|
+
# Converts hash and nil to an options object
|
3480
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3481
|
+
|
3482
|
+
# Customize the options with defaults
|
3483
|
+
metadata = @config.rpcs.get_space_event.metadata.to_h
|
3484
|
+
|
3485
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3486
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3487
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3488
|
+
gapic_version: ::Google::Apps::Chat::V1::VERSION
|
3489
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3490
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3491
|
+
|
3492
|
+
header_params = {}
|
3493
|
+
if request.name
|
3494
|
+
header_params["name"] = request.name
|
3495
|
+
end
|
3496
|
+
|
3497
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3498
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3499
|
+
|
3500
|
+
options.apply_defaults timeout: @config.rpcs.get_space_event.timeout,
|
3501
|
+
metadata: metadata,
|
3502
|
+
retry_policy: @config.rpcs.get_space_event.retry_policy
|
3503
|
+
|
3504
|
+
options.apply_defaults timeout: @config.timeout,
|
3505
|
+
metadata: @config.metadata,
|
3506
|
+
retry_policy: @config.retry_policy
|
3507
|
+
|
3508
|
+
@chat_service_stub.call_rpc :get_space_event, request, options: options do |response, operation|
|
3509
|
+
yield response, operation if block_given?
|
3510
|
+
return response
|
3511
|
+
end
|
3512
|
+
rescue ::GRPC::BadStatus => e
|
3513
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3514
|
+
end
|
3515
|
+
|
3516
|
+
##
|
3517
|
+
# Lists events from a Google Chat space. For each event, the
|
3518
|
+
# [payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload)
|
3519
|
+
# contains the most recent version of the Chat resource. For example, if you
|
3520
|
+
# list events about new space members, the server returns `Membership`
|
3521
|
+
# resources that contain the latest membership details. If new members were
|
3522
|
+
# removed during the requested period, the event payload contains an empty
|
3523
|
+
# `Membership` resource.
|
3524
|
+
#
|
3525
|
+
# Requires [user
|
3526
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
3527
|
+
# To list events, the authenticated user must be a member of the space.
|
3528
|
+
#
|
3529
|
+
# For an example, see [List events from a Google Chat
|
3530
|
+
# space](https://developers.google.com/workspace/chat/list-space-events).
|
3531
|
+
#
|
3532
|
+
# @overload list_space_events(request, options = nil)
|
3533
|
+
# Pass arguments to `list_space_events` via a request object, either of type
|
3534
|
+
# {::Google::Apps::Chat::V1::ListSpaceEventsRequest} or an equivalent Hash.
|
3535
|
+
#
|
3536
|
+
# @param request [::Google::Apps::Chat::V1::ListSpaceEventsRequest, ::Hash]
|
3537
|
+
# A request object representing the call parameters. Required. To specify no
|
3538
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
3539
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
3540
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
3541
|
+
#
|
3542
|
+
# @overload list_space_events(parent: nil, page_size: nil, page_token: nil, filter: nil)
|
3543
|
+
# Pass arguments to `list_space_events` via keyword arguments. Note that at
|
3544
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
3545
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
3546
|
+
#
|
3547
|
+
# @param parent [::String]
|
3548
|
+
# Required. Resource name of the [Google Chat
|
3549
|
+
# space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces)
|
3550
|
+
# where the events occurred.
|
3551
|
+
#
|
3552
|
+
# Format: `spaces/{space}`.
|
3553
|
+
# @param page_size [::Integer]
|
3554
|
+
# Optional. The maximum number of space events returned. The service might
|
3555
|
+
# return fewer than this value.
|
3556
|
+
#
|
3557
|
+
# Negative values return an `INVALID_ARGUMENT` error.
|
3558
|
+
# @param page_token [::String]
|
3559
|
+
# A page token, received from a previous list space events call. Provide this
|
3560
|
+
# to retrieve the subsequent page.
|
3561
|
+
#
|
3562
|
+
# When paginating, all other parameters provided to list space events must
|
3563
|
+
# match the call that provided the page token. Passing different values to
|
3564
|
+
# the other parameters might lead to unexpected results.
|
3565
|
+
# @param filter [::String]
|
3566
|
+
# Required. A query filter.
|
3567
|
+
#
|
3568
|
+
# You must specify at least one event type (`event_type`)
|
3569
|
+
# using the has `:` operator. To filter by multiple event types, use the `OR`
|
3570
|
+
# operator. Omit batch event types in your filter. The request automatically
|
3571
|
+
# returns any related batch events. For example, if you filter by new
|
3572
|
+
# reactions
|
3573
|
+
# (`google.workspace.chat.reaction.v1.created`), the server also returns
|
3574
|
+
# batch new reactions events
|
3575
|
+
# (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported
|
3576
|
+
# event types, see the [`SpaceEvents` reference
|
3577
|
+
# documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type).
|
3578
|
+
#
|
3579
|
+
# Optionally, you can also filter by start time (`start_time`) and
|
3580
|
+
# end time (`end_time`):
|
3581
|
+
#
|
3582
|
+
# * `start_time`: Exclusive timestamp from which to start listing space
|
3583
|
+
# events.
|
3584
|
+
# You can list events that occurred up to 28 days ago. If unspecified, lists
|
3585
|
+
# space events from the past 28 days.
|
3586
|
+
# * `end_time`: Inclusive timestamp until which space events are listed.
|
3587
|
+
# If unspecified, lists events up to the time of the request.
|
3588
|
+
#
|
3589
|
+
# To specify a start or end time, use the equals `=` operator and format in
|
3590
|
+
# [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both
|
3591
|
+
# `start_time` and `end_time`, use the `AND` operator.
|
3592
|
+
#
|
3593
|
+
# For example, the following queries are valid:
|
3594
|
+
#
|
3595
|
+
# ```
|
3596
|
+
# start_time="2023-08-23T19:20:33+00:00" AND
|
3597
|
+
# end_time="2023-08-23T19:21:54+00:00"
|
3598
|
+
# ```
|
3599
|
+
# ```
|
3600
|
+
# start_time="2023-08-23T19:20:33+00:00" AND
|
3601
|
+
# (event_types:"google.workspace.chat.space.v1.updated" OR
|
3602
|
+
# event_types:"google.workspace.chat.message.v1.created")
|
3603
|
+
# ```
|
3604
|
+
#
|
3605
|
+
# The following queries are invalid:
|
3606
|
+
#
|
3607
|
+
# ```
|
3608
|
+
# start_time="2023-08-23T19:20:33+00:00" OR
|
3609
|
+
# end_time="2023-08-23T19:21:54+00:00"
|
3610
|
+
# ```
|
3611
|
+
# ```
|
3612
|
+
# event_types:"google.workspace.chat.space.v1.updated" AND
|
3613
|
+
# event_types:"google.workspace.chat.message.v1.created"
|
3614
|
+
# ```
|
3615
|
+
#
|
3616
|
+
# Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
3617
|
+
# error.
|
3618
|
+
#
|
3619
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
3620
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Apps::Chat::V1::SpaceEvent>]
|
3621
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
3622
|
+
#
|
3623
|
+
# @return [::Gapic::PagedEnumerable<::Google::Apps::Chat::V1::SpaceEvent>]
|
3624
|
+
#
|
3625
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
3626
|
+
#
|
3627
|
+
# @example Basic example
|
3628
|
+
# require "google/apps/chat/v1"
|
3629
|
+
#
|
3630
|
+
# # Create a client object. The client can be reused for multiple calls.
|
3631
|
+
# client = Google::Apps::Chat::V1::ChatService::Client.new
|
3632
|
+
#
|
3633
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
3634
|
+
# request = Google::Apps::Chat::V1::ListSpaceEventsRequest.new
|
3635
|
+
#
|
3636
|
+
# # Call the list_space_events method.
|
3637
|
+
# result = client.list_space_events request
|
3638
|
+
#
|
3639
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
3640
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
3641
|
+
# result.each do |item|
|
3642
|
+
# # Each element is of type ::Google::Apps::Chat::V1::SpaceEvent.
|
3643
|
+
# p item
|
3644
|
+
# end
|
3645
|
+
#
|
3646
|
+
def list_space_events request, options = nil
|
3647
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
3648
|
+
|
3649
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::ListSpaceEventsRequest
|
3650
|
+
|
3651
|
+
# Converts hash and nil to an options object
|
3652
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
3653
|
+
|
3654
|
+
# Customize the options with defaults
|
3655
|
+
metadata = @config.rpcs.list_space_events.metadata.to_h
|
3656
|
+
|
3657
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
3658
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
3659
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
3660
|
+
gapic_version: ::Google::Apps::Chat::V1::VERSION
|
3661
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
3662
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
3663
|
+
|
3664
|
+
header_params = {}
|
3665
|
+
if request.parent
|
3666
|
+
header_params["parent"] = request.parent
|
3667
|
+
end
|
3668
|
+
|
3669
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
3670
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
3671
|
+
|
3672
|
+
options.apply_defaults timeout: @config.rpcs.list_space_events.timeout,
|
3673
|
+
metadata: metadata,
|
3674
|
+
retry_policy: @config.rpcs.list_space_events.retry_policy
|
3675
|
+
|
3676
|
+
options.apply_defaults timeout: @config.timeout,
|
3677
|
+
metadata: @config.metadata,
|
3678
|
+
retry_policy: @config.retry_policy
|
3679
|
+
|
3680
|
+
@chat_service_stub.call_rpc :list_space_events, request, options: options do |response, operation|
|
3681
|
+
response = ::Gapic::PagedEnumerable.new @chat_service_stub, :list_space_events, request, response, operation, options
|
3682
|
+
yield response, operation if block_given?
|
3683
|
+
return response
|
3684
|
+
end
|
3685
|
+
rescue ::GRPC::BadStatus => e
|
3686
|
+
raise ::Google::Cloud::Error.from_error(e)
|
3687
|
+
end
|
3688
|
+
|
3379
3689
|
##
|
3380
3690
|
# Configuration class for the ChatService API.
|
3381
3691
|
#
|
@@ -3659,6 +3969,16 @@ module Google
|
|
3659
3969
|
# @return [::Gapic::Config::Method]
|
3660
3970
|
#
|
3661
3971
|
attr_reader :get_thread_read_state
|
3972
|
+
##
|
3973
|
+
# RPC-specific configuration for `get_space_event`
|
3974
|
+
# @return [::Gapic::Config::Method]
|
3975
|
+
#
|
3976
|
+
attr_reader :get_space_event
|
3977
|
+
##
|
3978
|
+
# RPC-specific configuration for `list_space_events`
|
3979
|
+
# @return [::Gapic::Config::Method]
|
3980
|
+
#
|
3981
|
+
attr_reader :list_space_events
|
3662
3982
|
|
3663
3983
|
# @private
|
3664
3984
|
def initialize parent_rpcs = nil
|
@@ -3714,6 +4034,10 @@ module Google
|
|
3714
4034
|
@update_space_read_state = ::Gapic::Config::Method.new update_space_read_state_config
|
3715
4035
|
get_thread_read_state_config = parent_rpcs.get_thread_read_state if parent_rpcs.respond_to? :get_thread_read_state
|
3716
4036
|
@get_thread_read_state = ::Gapic::Config::Method.new get_thread_read_state_config
|
4037
|
+
get_space_event_config = parent_rpcs.get_space_event if parent_rpcs.respond_to? :get_space_event
|
4038
|
+
@get_space_event = ::Gapic::Config::Method.new get_space_event_config
|
4039
|
+
list_space_events_config = parent_rpcs.list_space_events if parent_rpcs.respond_to? :list_space_events
|
4040
|
+
@list_space_events = ::Gapic::Config::Method.new list_space_events_config
|
3717
4041
|
|
3718
4042
|
yield self if block_given?
|
3719
4043
|
end
|
@@ -26,6 +26,11 @@ module Google
|
|
26
26
|
# Credentials for the ChatService API.
|
27
27
|
class Credentials < ::Google::Auth::Credentials
|
28
28
|
self.scope = [
|
29
|
+
"https://www.googleapis.com/auth/chat.admin.delete",
|
30
|
+
"https://www.googleapis.com/auth/chat.admin.memberships",
|
31
|
+
"https://www.googleapis.com/auth/chat.admin.memberships.readonly",
|
32
|
+
"https://www.googleapis.com/auth/chat.admin.spaces",
|
33
|
+
"https://www.googleapis.com/auth/chat.admin.spaces.readonly",
|
29
34
|
"https://www.googleapis.com/auth/chat.bot",
|
30
35
|
"https://www.googleapis.com/auth/chat.delete",
|
31
36
|
"https://www.googleapis.com/auth/chat.import",
|
@@ -129,6 +129,23 @@ module Google
|
|
129
129
|
"spaces/#{space}"
|
130
130
|
end
|
131
131
|
|
132
|
+
##
|
133
|
+
# Create a fully-qualified SpaceEvent resource string.
|
134
|
+
#
|
135
|
+
# The resource will be in the following format:
|
136
|
+
#
|
137
|
+
# `spaces/{space}/spaceEvents/{space_event}`
|
138
|
+
#
|
139
|
+
# @param space [String]
|
140
|
+
# @param space_event [String]
|
141
|
+
#
|
142
|
+
# @return [::String]
|
143
|
+
def space_event_path space:, space_event:
|
144
|
+
raise ::ArgumentError, "space cannot contain /" if space.to_s.include? "/"
|
145
|
+
|
146
|
+
"spaces/#{space}/spaceEvents/#{space_event}"
|
147
|
+
end
|
148
|
+
|
132
149
|
##
|
133
150
|
# Create a fully-qualified SpaceReadState resource string.
|
134
151
|
#
|