google-apps-chat-v1 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8b7ddf7a8c1fd73b4676ab127d1306d050422ac7061fd2ee13a57af595f5129
4
- data.tar.gz: 11bb0e5aec273efcf988855a69723f0cbd2596825fff85f1e5324027bc75ebc5
3
+ metadata.gz: 23faf0fbefeb7f44a5fba6d51a6371567c7827b21defcc1d3c4c71793d569e83
4
+ data.tar.gz: dd5d816e2af03d322fc242adc747a451003de933de9182d39aff485ef2338fae
5
5
  SHA512:
6
- metadata.gz: 11fa6aa52fdc219030ffd9bf155818ac4d9e79329744a99277db129fd899b316ea8a5aea8a4b2336077faa17330320f72e586046323af3d404d0ce431e7a48a3
7
- data.tar.gz: f4a3304c4b9a2166212ee5f1ee528e7a3ada3a655884181d1df51da3bae6549e12fea620e60253a9ab95923be65f1ccad724553cd0ad17dc2d3b5c1412919c7e
6
+ metadata.gz: 86b0dee8653233f4e3f751ec2de7fec903e8686422b9185de7725d4319db555739ac5056e6ae90f72d64d8be053bdd15cbe31cf8300e1b4a5699cf97e4ad50da
7
+ data.tar.gz: b8ddcca37979e8b189ad49a99552816901779f1a5b0dce66eb02dc6d83a40f712765c45db91c7de9cbeaa8cb6e0e94ef1143d46a35882b07d63c5fb616780427
@@ -31,6 +31,9 @@ module Google
31
31
  # integrations on Google Chat Platform.
32
32
  #
33
33
  class Client
34
+ # @private
35
+ API_VERSION = ""
36
+
34
37
  # @private
35
38
  DEFAULT_ENDPOINT_TEMPLATE = "chat.$UNIVERSE_DOMAIN$"
36
39
 
@@ -392,10 +395,11 @@ module Google
392
395
  # Customize the options with defaults
393
396
  metadata = @config.rpcs.create_message.metadata.to_h
394
397
 
395
- # Set x-goog-api-client and x-goog-user-project headers
398
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
396
399
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
397
400
  lib_name: @config.lib_name, lib_version: @config.lib_version,
398
401
  gapic_version: ::Google::Apps::Chat::V1::VERSION
402
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
399
403
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
400
404
 
401
405
  header_params = {}
@@ -558,10 +562,11 @@ module Google
558
562
  # Customize the options with defaults
559
563
  metadata = @config.rpcs.list_messages.metadata.to_h
560
564
 
561
- # Set x-goog-api-client and x-goog-user-project headers
565
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
562
566
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
563
567
  lib_name: @config.lib_name, lib_version: @config.lib_version,
564
568
  gapic_version: ::Google::Apps::Chat::V1::VERSION
569
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
565
570
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
566
571
 
567
572
  header_params = {}
@@ -735,10 +740,11 @@ module Google
735
740
  # Customize the options with defaults
736
741
  metadata = @config.rpcs.list_memberships.metadata.to_h
737
742
 
738
- # Set x-goog-api-client and x-goog-user-project headers
743
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
739
744
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
740
745
  lib_name: @config.lib_name, lib_version: @config.lib_version,
741
746
  gapic_version: ::Google::Apps::Chat::V1::VERSION
747
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
742
748
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
743
749
 
744
750
  header_params = {}
@@ -843,10 +849,11 @@ module Google
843
849
  # Customize the options with defaults
844
850
  metadata = @config.rpcs.get_membership.metadata.to_h
845
851
 
846
- # Set x-goog-api-client and x-goog-user-project headers
852
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
847
853
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
848
854
  lib_name: @config.lib_name, lib_version: @config.lib_version,
849
855
  gapic_version: ::Google::Apps::Chat::V1::VERSION
856
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
850
857
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
851
858
 
852
859
  header_params = {}
@@ -947,10 +954,11 @@ module Google
947
954
  # Customize the options with defaults
948
955
  metadata = @config.rpcs.get_message.metadata.to_h
949
956
 
950
- # Set x-goog-api-client and x-goog-user-project headers
957
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
951
958
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
952
959
  lib_name: @config.lib_name, lib_version: @config.lib_version,
953
960
  gapic_version: ::Google::Apps::Chat::V1::VERSION
961
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
954
962
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
955
963
 
956
964
  header_params = {}
@@ -1070,10 +1078,11 @@ module Google
1070
1078
  # Customize the options with defaults
1071
1079
  metadata = @config.rpcs.update_message.metadata.to_h
1072
1080
 
1073
- # Set x-goog-api-client and x-goog-user-project headers
1081
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1074
1082
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1075
1083
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1076
1084
  gapic_version: ::Google::Apps::Chat::V1::VERSION
1085
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1077
1086
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1078
1087
 
1079
1088
  header_params = {}
@@ -1182,10 +1191,11 @@ module Google
1182
1191
  # Customize the options with defaults
1183
1192
  metadata = @config.rpcs.delete_message.metadata.to_h
1184
1193
 
1185
- # Set x-goog-api-client and x-goog-user-project headers
1194
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1186
1195
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1187
1196
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1188
1197
  gapic_version: ::Google::Apps::Chat::V1::VERSION
1198
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1189
1199
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1190
1200
 
1191
1201
  header_params = {}
@@ -1275,10 +1285,11 @@ module Google
1275
1285
  # Customize the options with defaults
1276
1286
  metadata = @config.rpcs.get_attachment.metadata.to_h
1277
1287
 
1278
- # Set x-goog-api-client and x-goog-user-project headers
1288
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1279
1289
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1280
1290
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1281
1291
  gapic_version: ::Google::Apps::Chat::V1::VERSION
1292
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1282
1293
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1283
1294
 
1284
1295
  header_params = {}
@@ -1371,10 +1382,11 @@ module Google
1371
1382
  # Customize the options with defaults
1372
1383
  metadata = @config.rpcs.upload_attachment.metadata.to_h
1373
1384
 
1374
- # Set x-goog-api-client and x-goog-user-project headers
1385
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1375
1386
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1376
1387
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1377
1388
  gapic_version: ::Google::Apps::Chat::V1::VERSION
1389
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1378
1390
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1379
1391
 
1380
1392
  header_params = {}
@@ -1508,10 +1520,11 @@ module Google
1508
1520
  # Customize the options with defaults
1509
1521
  metadata = @config.rpcs.list_spaces.metadata.to_h
1510
1522
 
1511
- # Set x-goog-api-client and x-goog-user-project headers
1523
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1512
1524
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1513
1525
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1514
1526
  gapic_version: ::Google::Apps::Chat::V1::VERSION
1527
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1515
1528
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1516
1529
 
1517
1530
  options.apply_defaults timeout: @config.rpcs.list_spaces.timeout,
@@ -1598,10 +1611,11 @@ module Google
1598
1611
  # Customize the options with defaults
1599
1612
  metadata = @config.rpcs.get_space.metadata.to_h
1600
1613
 
1601
- # Set x-goog-api-client and x-goog-user-project headers
1614
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1602
1615
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1603
1616
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1604
1617
  gapic_version: ::Google::Apps::Chat::V1::VERSION
1618
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1605
1619
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1606
1620
 
1607
1621
  header_params = {}
@@ -1707,10 +1721,11 @@ module Google
1707
1721
  # Customize the options with defaults
1708
1722
  metadata = @config.rpcs.create_space.metadata.to_h
1709
1723
 
1710
- # Set x-goog-api-client and x-goog-user-project headers
1724
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1711
1725
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1712
1726
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1713
1727
  gapic_version: ::Google::Apps::Chat::V1::VERSION
1728
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1714
1729
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1715
1730
 
1716
1731
  options.apply_defaults timeout: @config.rpcs.create_space.timeout,
@@ -1745,6 +1760,17 @@ module Google
1745
1760
  # you can add the user to the space by setting the `membership.member.name`
1746
1761
  # to `users/user@example.com` or `users/123456789`.
1747
1762
  #
1763
+ # To specify the Google groups to add, add memberships with the
1764
+ # appropriate `membership.group_member.name`. To add or invite a Google
1765
+ # group, use `groups/{group}`, where `{group}` is the `id` for the group from
1766
+ # the Cloud Identity Groups API. For example, you can use [Cloud Identity
1767
+ # Groups lookup
1768
+ # API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup)
1769
+ # to retrieve the ID `123456789` for group email `group@example.com`, then
1770
+ # you can add the group to the space by setting the
1771
+ # `membership.group_member.name` to `groups/123456789`. Group email is not
1772
+ # supported, and Google groups can only be added as members in named spaces.
1773
+ #
1748
1774
  # For a named space or group chat, if the caller blocks, or is blocked
1749
1775
  # by some members, or doesn't have permission to add some members, then
1750
1776
  # those members aren't added to the created space.
@@ -1819,8 +1845,8 @@ module Google
1819
1845
  # Specifying an existing request ID from the same Chat app with a different
1820
1846
  # authenticated user returns an error.
1821
1847
  # @param memberships [::Array<::Google::Apps::Chat::V1::Membership, ::Hash>]
1822
- # Optional. The Google Chat users to invite to join the space. Omit the
1823
- # calling user, as they are added automatically.
1848
+ # Optional. The Google Chat users or groups to invite to join the space. Omit
1849
+ # the calling user, as they are added automatically.
1824
1850
  #
1825
1851
  # The set currently allows up to 20 memberships (in addition to the caller).
1826
1852
  #
@@ -1833,6 +1859,10 @@ module Google
1833
1859
  # To invite Gmail users or users from external Google Workspace domains,
1834
1860
  # user's email must be used for `{user}`.
1835
1861
  #
1862
+ # For Google group membership, the `Membership.group_member` field must
1863
+ # contain a `group` with `name` populated (format `groups/{group}`). You
1864
+ # can only add Google groups when setting `Space.spaceType` to `SPACE`.
1865
+ #
1836
1866
  # Optional when setting `Space.spaceType` to `SPACE`.
1837
1867
  #
1838
1868
  # Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at
@@ -1879,10 +1909,11 @@ module Google
1879
1909
  # Customize the options with defaults
1880
1910
  metadata = @config.rpcs.set_up_space.metadata.to_h
1881
1911
 
1882
- # Set x-goog-api-client and x-goog-user-project headers
1912
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1883
1913
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1884
1914
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1885
1915
  gapic_version: ::Google::Apps::Chat::V1::VERSION
1916
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1886
1917
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1887
1918
 
1888
1919
  options.apply_defaults timeout: @config.rpcs.set_up_space.timeout,
@@ -2003,10 +2034,11 @@ module Google
2003
2034
  # Customize the options with defaults
2004
2035
  metadata = @config.rpcs.update_space.metadata.to_h
2005
2036
 
2006
- # Set x-goog-api-client and x-goog-user-project headers
2037
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2007
2038
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2008
2039
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2009
2040
  gapic_version: ::Google::Apps::Chat::V1::VERSION
2041
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2010
2042
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2011
2043
 
2012
2044
  header_params = {}
@@ -2097,10 +2129,11 @@ module Google
2097
2129
  # Customize the options with defaults
2098
2130
  metadata = @config.rpcs.delete_space.metadata.to_h
2099
2131
 
2100
- # Set x-goog-api-client and x-goog-user-project headers
2132
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2101
2133
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2102
2134
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2103
2135
  gapic_version: ::Google::Apps::Chat::V1::VERSION
2136
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2104
2137
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2105
2138
 
2106
2139
  header_params = {}
@@ -2189,10 +2222,11 @@ module Google
2189
2222
  # Customize the options with defaults
2190
2223
  metadata = @config.rpcs.complete_import_space.metadata.to_h
2191
2224
 
2192
- # Set x-goog-api-client and x-goog-user-project headers
2225
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2193
2226
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2194
2227
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2195
2228
  gapic_version: ::Google::Apps::Chat::V1::VERSION
2229
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2196
2230
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2197
2231
 
2198
2232
  header_params = {}
@@ -2304,10 +2338,11 @@ module Google
2304
2338
  # Customize the options with defaults
2305
2339
  metadata = @config.rpcs.find_direct_message.metadata.to_h
2306
2340
 
2307
- # Set x-goog-api-client and x-goog-user-project headers
2341
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2308
2342
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2309
2343
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2310
2344
  gapic_version: ::Google::Apps::Chat::V1::VERSION
2345
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2311
2346
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2312
2347
 
2313
2348
  options.apply_defaults timeout: @config.rpcs.find_direct_message.timeout,
@@ -2338,7 +2373,8 @@ module Google
2338
2373
  # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
2339
2374
  #
2340
2375
  # To specify the member to add, set the `membership.member.name` for the
2341
- # human or app member.
2376
+ # human or app member, or set the `membership.group_member.name` for the
2377
+ # group member.
2342
2378
  #
2343
2379
  # - To add the calling app to a space or a direct message between two human
2344
2380
  # users, use `users/app`. Unable to add other
@@ -2352,6 +2388,15 @@ module Google
2352
2388
  # the space by setting the `membership.member.name` to
2353
2389
  # `users/user@example.com` or `users/123456789`.
2354
2390
  #
2391
+ # - To add or invite a Google group in a named space, use
2392
+ # `groups/{group}`, where `{group}` is the `id` for the group from the Cloud
2393
+ # Identity Groups API. For example, you can use [Cloud Identity Groups lookup
2394
+ # API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup)
2395
+ # to retrieve the ID `123456789` for group email `group@example.com`, then
2396
+ # you can add or invite the group to a named space by setting the
2397
+ # `membership.group_member.name` to `groups/123456789`. Group email is not
2398
+ # supported, and Google groups can only be added as members in named spaces.
2399
+ #
2355
2400
  # @overload create_membership(request, options = nil)
2356
2401
  # Pass arguments to `create_membership` via a request object, either of type
2357
2402
  # {::Google::Apps::Chat::V1::CreateMembershipRequest} or an equivalent Hash.
@@ -2424,10 +2469,11 @@ module Google
2424
2469
  # Customize the options with defaults
2425
2470
  metadata = @config.rpcs.create_membership.metadata.to_h
2426
2471
 
2427
- # Set x-goog-api-client and x-goog-user-project headers
2472
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2428
2473
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2429
2474
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2430
2475
  gapic_version: ::Google::Apps::Chat::V1::VERSION
2476
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2431
2477
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2432
2478
 
2433
2479
  header_params = {}
@@ -2521,10 +2567,11 @@ module Google
2521
2567
  # Customize the options with defaults
2522
2568
  metadata = @config.rpcs.update_membership.metadata.to_h
2523
2569
 
2524
- # Set x-goog-api-client and x-goog-user-project headers
2570
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2525
2571
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2526
2572
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2527
2573
  gapic_version: ::Google::Apps::Chat::V1::VERSION
2574
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2528
2575
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2529
2576
 
2530
2577
  header_params = {}
@@ -2624,10 +2671,11 @@ module Google
2624
2671
  # Customize the options with defaults
2625
2672
  metadata = @config.rpcs.delete_membership.metadata.to_h
2626
2673
 
2627
- # Set x-goog-api-client and x-goog-user-project headers
2674
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2628
2675
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2629
2676
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2630
2677
  gapic_version: ::Google::Apps::Chat::V1::VERSION
2678
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2631
2679
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2632
2680
 
2633
2681
  header_params = {}
@@ -2718,10 +2766,11 @@ module Google
2718
2766
  # Customize the options with defaults
2719
2767
  metadata = @config.rpcs.create_reaction.metadata.to_h
2720
2768
 
2721
- # Set x-goog-api-client and x-goog-user-project headers
2769
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2722
2770
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2723
2771
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2724
2772
  gapic_version: ::Google::Apps::Chat::V1::VERSION
2773
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2725
2774
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2726
2775
 
2727
2776
  header_params = {}
@@ -2870,10 +2919,11 @@ module Google
2870
2919
  # Customize the options with defaults
2871
2920
  metadata = @config.rpcs.list_reactions.metadata.to_h
2872
2921
 
2873
- # Set x-goog-api-client and x-goog-user-project headers
2922
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2874
2923
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2875
2924
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2876
2925
  gapic_version: ::Google::Apps::Chat::V1::VERSION
2926
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2877
2927
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2878
2928
 
2879
2929
  header_params = {}
@@ -2963,10 +3013,11 @@ module Google
2963
3013
  # Customize the options with defaults
2964
3014
  metadata = @config.rpcs.delete_reaction.metadata.to_h
2965
3015
 
2966
- # Set x-goog-api-client and x-goog-user-project headers
3016
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2967
3017
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2968
3018
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2969
3019
  gapic_version: ::Google::Apps::Chat::V1::VERSION
3020
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2970
3021
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2971
3022
 
2972
3023
  header_params = {}
@@ -3068,10 +3119,11 @@ module Google
3068
3119
  # Customize the options with defaults
3069
3120
  metadata = @config.rpcs.get_space_read_state.metadata.to_h
3070
3121
 
3071
- # Set x-goog-api-client and x-goog-user-project headers
3122
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3072
3123
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3073
3124
  lib_name: @config.lib_name, lib_version: @config.lib_version,
3074
3125
  gapic_version: ::Google::Apps::Chat::V1::VERSION
3126
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3075
3127
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3076
3128
 
3077
3129
  header_params = {}
@@ -3186,10 +3238,11 @@ module Google
3186
3238
  # Customize the options with defaults
3187
3239
  metadata = @config.rpcs.update_space_read_state.metadata.to_h
3188
3240
 
3189
- # Set x-goog-api-client and x-goog-user-project headers
3241
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3190
3242
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3191
3243
  lib_name: @config.lib_name, lib_version: @config.lib_version,
3192
3244
  gapic_version: ::Google::Apps::Chat::V1::VERSION
3245
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3193
3246
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3194
3247
 
3195
3248
  header_params = {}
@@ -3292,10 +3345,11 @@ module Google
3292
3345
  # Customize the options with defaults
3293
3346
  metadata = @config.rpcs.get_thread_read_state.metadata.to_h
3294
3347
 
3295
- # Set x-goog-api-client and x-goog-user-project headers
3348
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3296
3349
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3297
3350
  lib_name: @config.lib_name, lib_version: @config.lib_version,
3298
3351
  gapic_version: ::Google::Apps::Chat::V1::VERSION
3352
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3299
3353
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3300
3354
 
3301
3355
  header_params = {}
@@ -33,6 +33,9 @@ module Google
33
33
  # integrations on Google Chat Platform.
34
34
  #
35
35
  class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
36
39
  # @private
37
40
  DEFAULT_ENDPOINT_TEMPLATE = "chat.$UNIVERSE_DOMAIN$"
38
41
 
@@ -384,12 +387,13 @@ module Google
384
387
  # Customize the options with defaults
385
388
  call_metadata = @config.rpcs.create_message.metadata.to_h
386
389
 
387
- # Set x-goog-api-client and x-goog-user-project headers
390
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
388
391
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
389
392
  lib_name: @config.lib_name, lib_version: @config.lib_version,
390
393
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
391
394
  transports_version_send: [:rest]
392
395
 
396
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
393
397
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
394
398
 
395
399
  options.apply_defaults timeout: @config.rpcs.create_message.timeout,
@@ -543,12 +547,13 @@ module Google
543
547
  # Customize the options with defaults
544
548
  call_metadata = @config.rpcs.list_messages.metadata.to_h
545
549
 
546
- # Set x-goog-api-client and x-goog-user-project headers
550
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
547
551
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
548
552
  lib_name: @config.lib_name, lib_version: @config.lib_version,
549
553
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
550
554
  transports_version_send: [:rest]
551
555
 
556
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
552
557
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
553
558
 
554
559
  options.apply_defaults timeout: @config.rpcs.list_messages.timeout,
@@ -713,12 +718,13 @@ module Google
713
718
  # Customize the options with defaults
714
719
  call_metadata = @config.rpcs.list_memberships.metadata.to_h
715
720
 
716
- # Set x-goog-api-client and x-goog-user-project headers
721
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
717
722
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
718
723
  lib_name: @config.lib_name, lib_version: @config.lib_version,
719
724
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
720
725
  transports_version_send: [:rest]
721
726
 
727
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
722
728
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
723
729
 
724
730
  options.apply_defaults timeout: @config.rpcs.list_memberships.timeout,
@@ -814,12 +820,13 @@ module Google
814
820
  # Customize the options with defaults
815
821
  call_metadata = @config.rpcs.get_membership.metadata.to_h
816
822
 
817
- # Set x-goog-api-client and x-goog-user-project headers
823
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
818
824
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
819
825
  lib_name: @config.lib_name, lib_version: @config.lib_version,
820
826
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
821
827
  transports_version_send: [:rest]
822
828
 
829
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
823
830
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
824
831
 
825
832
  options.apply_defaults timeout: @config.rpcs.get_membership.timeout,
@@ -911,12 +918,13 @@ module Google
911
918
  # Customize the options with defaults
912
919
  call_metadata = @config.rpcs.get_message.metadata.to_h
913
920
 
914
- # Set x-goog-api-client and x-goog-user-project headers
921
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
915
922
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
916
923
  lib_name: @config.lib_name, lib_version: @config.lib_version,
917
924
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
918
925
  transports_version_send: [:rest]
919
926
 
927
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
920
928
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
921
929
 
922
930
  options.apply_defaults timeout: @config.rpcs.get_message.timeout,
@@ -1027,12 +1035,13 @@ module Google
1027
1035
  # Customize the options with defaults
1028
1036
  call_metadata = @config.rpcs.update_message.metadata.to_h
1029
1037
 
1030
- # Set x-goog-api-client and x-goog-user-project headers
1038
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1031
1039
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1032
1040
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1033
1041
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
1034
1042
  transports_version_send: [:rest]
1035
1043
 
1044
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1036
1045
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1037
1046
 
1038
1047
  options.apply_defaults timeout: @config.rpcs.update_message.timeout,
@@ -1132,12 +1141,13 @@ module Google
1132
1141
  # Customize the options with defaults
1133
1142
  call_metadata = @config.rpcs.delete_message.metadata.to_h
1134
1143
 
1135
- # Set x-goog-api-client and x-goog-user-project headers
1144
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1136
1145
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1137
1146
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1138
1147
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
1139
1148
  transports_version_send: [:rest]
1140
1149
 
1150
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1141
1151
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1142
1152
 
1143
1153
  options.apply_defaults timeout: @config.rpcs.delete_message.timeout,
@@ -1218,12 +1228,13 @@ module Google
1218
1228
  # Customize the options with defaults
1219
1229
  call_metadata = @config.rpcs.get_attachment.metadata.to_h
1220
1230
 
1221
- # Set x-goog-api-client and x-goog-user-project headers
1231
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1222
1232
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1223
1233
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1224
1234
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
1225
1235
  transports_version_send: [:rest]
1226
1236
 
1237
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1227
1238
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1228
1239
 
1229
1240
  options.apply_defaults timeout: @config.rpcs.get_attachment.timeout,
@@ -1307,12 +1318,13 @@ module Google
1307
1318
  # Customize the options with defaults
1308
1319
  call_metadata = @config.rpcs.upload_attachment.metadata.to_h
1309
1320
 
1310
- # Set x-goog-api-client and x-goog-user-project headers
1321
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1311
1322
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1312
1323
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1313
1324
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
1314
1325
  transports_version_send: [:rest]
1315
1326
 
1327
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1316
1328
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1317
1329
 
1318
1330
  options.apply_defaults timeout: @config.rpcs.upload_attachment.timeout,
@@ -1437,12 +1449,13 @@ module Google
1437
1449
  # Customize the options with defaults
1438
1450
  call_metadata = @config.rpcs.list_spaces.metadata.to_h
1439
1451
 
1440
- # Set x-goog-api-client and x-goog-user-project headers
1452
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1441
1453
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1442
1454
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1443
1455
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
1444
1456
  transports_version_send: [:rest]
1445
1457
 
1458
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1446
1459
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1447
1460
 
1448
1461
  options.apply_defaults timeout: @config.rpcs.list_spaces.timeout,
@@ -1528,12 +1541,13 @@ module Google
1528
1541
  # Customize the options with defaults
1529
1542
  call_metadata = @config.rpcs.get_space.metadata.to_h
1530
1543
 
1531
- # Set x-goog-api-client and x-goog-user-project headers
1544
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1532
1545
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1533
1546
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1534
1547
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
1535
1548
  transports_version_send: [:rest]
1536
1549
 
1550
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1537
1551
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1538
1552
 
1539
1553
  options.apply_defaults timeout: @config.rpcs.get_space.timeout,
@@ -1630,12 +1644,13 @@ module Google
1630
1644
  # Customize the options with defaults
1631
1645
  call_metadata = @config.rpcs.create_space.metadata.to_h
1632
1646
 
1633
- # Set x-goog-api-client and x-goog-user-project headers
1647
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1634
1648
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1635
1649
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1636
1650
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
1637
1651
  transports_version_send: [:rest]
1638
1652
 
1653
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1639
1654
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1640
1655
 
1641
1656
  options.apply_defaults timeout: @config.rpcs.create_space.timeout,
@@ -1670,6 +1685,17 @@ module Google
1670
1685
  # you can add the user to the space by setting the `membership.member.name`
1671
1686
  # to `users/user@example.com` or `users/123456789`.
1672
1687
  #
1688
+ # To specify the Google groups to add, add memberships with the
1689
+ # appropriate `membership.group_member.name`. To add or invite a Google
1690
+ # group, use `groups/{group}`, where `{group}` is the `id` for the group from
1691
+ # the Cloud Identity Groups API. For example, you can use [Cloud Identity
1692
+ # Groups lookup
1693
+ # API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup)
1694
+ # to retrieve the ID `123456789` for group email `group@example.com`, then
1695
+ # you can add the group to the space by setting the
1696
+ # `membership.group_member.name` to `groups/123456789`. Group email is not
1697
+ # supported, and Google groups can only be added as members in named spaces.
1698
+ #
1673
1699
  # For a named space or group chat, if the caller blocks, or is blocked
1674
1700
  # by some members, or doesn't have permission to add some members, then
1675
1701
  # those members aren't added to the created space.
@@ -1744,8 +1770,8 @@ module Google
1744
1770
  # Specifying an existing request ID from the same Chat app with a different
1745
1771
  # authenticated user returns an error.
1746
1772
  # @param memberships [::Array<::Google::Apps::Chat::V1::Membership, ::Hash>]
1747
- # Optional. The Google Chat users to invite to join the space. Omit the
1748
- # calling user, as they are added automatically.
1773
+ # Optional. The Google Chat users or groups to invite to join the space. Omit
1774
+ # the calling user, as they are added automatically.
1749
1775
  #
1750
1776
  # The set currently allows up to 20 memberships (in addition to the caller).
1751
1777
  #
@@ -1758,6 +1784,10 @@ module Google
1758
1784
  # To invite Gmail users or users from external Google Workspace domains,
1759
1785
  # user's email must be used for `{user}`.
1760
1786
  #
1787
+ # For Google group membership, the `Membership.group_member` field must
1788
+ # contain a `group` with `name` populated (format `groups/{group}`). You
1789
+ # can only add Google groups when setting `Space.spaceType` to `SPACE`.
1790
+ #
1761
1791
  # Optional when setting `Space.spaceType` to `SPACE`.
1762
1792
  #
1763
1793
  # Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at
@@ -1803,12 +1833,13 @@ module Google
1803
1833
  # Customize the options with defaults
1804
1834
  call_metadata = @config.rpcs.set_up_space.metadata.to_h
1805
1835
 
1806
- # Set x-goog-api-client and x-goog-user-project headers
1836
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1807
1837
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1808
1838
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1809
1839
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
1810
1840
  transports_version_send: [:rest]
1811
1841
 
1842
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1812
1843
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1813
1844
 
1814
1845
  options.apply_defaults timeout: @config.rpcs.set_up_space.timeout,
@@ -1928,12 +1959,13 @@ module Google
1928
1959
  # Customize the options with defaults
1929
1960
  call_metadata = @config.rpcs.update_space.metadata.to_h
1930
1961
 
1931
- # Set x-goog-api-client and x-goog-user-project headers
1962
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1932
1963
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1933
1964
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1934
1965
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
1935
1966
  transports_version_send: [:rest]
1936
1967
 
1968
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1937
1969
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1938
1970
 
1939
1971
  options.apply_defaults timeout: @config.rpcs.update_space.timeout,
@@ -2015,12 +2047,13 @@ module Google
2015
2047
  # Customize the options with defaults
2016
2048
  call_metadata = @config.rpcs.delete_space.metadata.to_h
2017
2049
 
2018
- # Set x-goog-api-client and x-goog-user-project headers
2050
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2019
2051
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2020
2052
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2021
2053
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
2022
2054
  transports_version_send: [:rest]
2023
2055
 
2056
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2024
2057
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2025
2058
 
2026
2059
  options.apply_defaults timeout: @config.rpcs.delete_space.timeout,
@@ -2100,12 +2133,13 @@ module Google
2100
2133
  # Customize the options with defaults
2101
2134
  call_metadata = @config.rpcs.complete_import_space.metadata.to_h
2102
2135
 
2103
- # Set x-goog-api-client and x-goog-user-project headers
2136
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2104
2137
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2105
2138
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2106
2139
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
2107
2140
  transports_version_send: [:rest]
2108
2141
 
2142
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2109
2143
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2110
2144
 
2111
2145
  options.apply_defaults timeout: @config.rpcs.complete_import_space.timeout,
@@ -2208,12 +2242,13 @@ module Google
2208
2242
  # Customize the options with defaults
2209
2243
  call_metadata = @config.rpcs.find_direct_message.metadata.to_h
2210
2244
 
2211
- # Set x-goog-api-client and x-goog-user-project headers
2245
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2212
2246
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2213
2247
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2214
2248
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
2215
2249
  transports_version_send: [:rest]
2216
2250
 
2251
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2217
2252
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2218
2253
 
2219
2254
  options.apply_defaults timeout: @config.rpcs.find_direct_message.timeout,
@@ -2244,7 +2279,8 @@ module Google
2244
2279
  # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
2245
2280
  #
2246
2281
  # To specify the member to add, set the `membership.member.name` for the
2247
- # human or app member.
2282
+ # human or app member, or set the `membership.group_member.name` for the
2283
+ # group member.
2248
2284
  #
2249
2285
  # - To add the calling app to a space or a direct message between two human
2250
2286
  # users, use `users/app`. Unable to add other
@@ -2258,6 +2294,15 @@ module Google
2258
2294
  # the space by setting the `membership.member.name` to
2259
2295
  # `users/user@example.com` or `users/123456789`.
2260
2296
  #
2297
+ # - To add or invite a Google group in a named space, use
2298
+ # `groups/{group}`, where `{group}` is the `id` for the group from the Cloud
2299
+ # Identity Groups API. For example, you can use [Cloud Identity Groups lookup
2300
+ # API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup)
2301
+ # to retrieve the ID `123456789` for group email `group@example.com`, then
2302
+ # you can add or invite the group to a named space by setting the
2303
+ # `membership.group_member.name` to `groups/123456789`. Group email is not
2304
+ # supported, and Google groups can only be added as members in named spaces.
2305
+ #
2261
2306
  # @overload create_membership(request, options = nil)
2262
2307
  # Pass arguments to `create_membership` via a request object, either of type
2263
2308
  # {::Google::Apps::Chat::V1::CreateMembershipRequest} or an equivalent Hash.
@@ -2329,12 +2374,13 @@ module Google
2329
2374
  # Customize the options with defaults
2330
2375
  call_metadata = @config.rpcs.create_membership.metadata.to_h
2331
2376
 
2332
- # Set x-goog-api-client and x-goog-user-project headers
2377
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2333
2378
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2334
2379
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2335
2380
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
2336
2381
  transports_version_send: [:rest]
2337
2382
 
2383
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2338
2384
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2339
2385
 
2340
2386
  options.apply_defaults timeout: @config.rpcs.create_membership.timeout,
@@ -2419,12 +2465,13 @@ module Google
2419
2465
  # Customize the options with defaults
2420
2466
  call_metadata = @config.rpcs.update_membership.metadata.to_h
2421
2467
 
2422
- # Set x-goog-api-client and x-goog-user-project headers
2468
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2423
2469
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2424
2470
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2425
2471
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
2426
2472
  transports_version_send: [:rest]
2427
2473
 
2474
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2428
2475
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2429
2476
 
2430
2477
  options.apply_defaults timeout: @config.rpcs.update_membership.timeout,
@@ -2515,12 +2562,13 @@ module Google
2515
2562
  # Customize the options with defaults
2516
2563
  call_metadata = @config.rpcs.delete_membership.metadata.to_h
2517
2564
 
2518
- # Set x-goog-api-client and x-goog-user-project headers
2565
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2519
2566
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2520
2567
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2521
2568
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
2522
2569
  transports_version_send: [:rest]
2523
2570
 
2571
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2524
2572
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2525
2573
 
2526
2574
  options.apply_defaults timeout: @config.rpcs.delete_membership.timeout,
@@ -2602,12 +2650,13 @@ module Google
2602
2650
  # Customize the options with defaults
2603
2651
  call_metadata = @config.rpcs.create_reaction.metadata.to_h
2604
2652
 
2605
- # Set x-goog-api-client and x-goog-user-project headers
2653
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2606
2654
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2607
2655
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2608
2656
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
2609
2657
  transports_version_send: [:rest]
2610
2658
 
2659
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2611
2660
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2612
2661
 
2613
2662
  options.apply_defaults timeout: @config.rpcs.create_reaction.timeout,
@@ -2747,12 +2796,13 @@ module Google
2747
2796
  # Customize the options with defaults
2748
2797
  call_metadata = @config.rpcs.list_reactions.metadata.to_h
2749
2798
 
2750
- # Set x-goog-api-client and x-goog-user-project headers
2799
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2751
2800
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2752
2801
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2753
2802
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
2754
2803
  transports_version_send: [:rest]
2755
2804
 
2805
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2756
2806
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2757
2807
 
2758
2808
  options.apply_defaults timeout: @config.rpcs.list_reactions.timeout,
@@ -2833,12 +2883,13 @@ module Google
2833
2883
  # Customize the options with defaults
2834
2884
  call_metadata = @config.rpcs.delete_reaction.metadata.to_h
2835
2885
 
2836
- # Set x-goog-api-client and x-goog-user-project headers
2886
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2837
2887
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2838
2888
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2839
2889
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
2840
2890
  transports_version_send: [:rest]
2841
2891
 
2892
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2842
2893
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2843
2894
 
2844
2895
  options.apply_defaults timeout: @config.rpcs.delete_reaction.timeout,
@@ -2931,12 +2982,13 @@ module Google
2931
2982
  # Customize the options with defaults
2932
2983
  call_metadata = @config.rpcs.get_space_read_state.metadata.to_h
2933
2984
 
2934
- # Set x-goog-api-client and x-goog-user-project headers
2985
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2935
2986
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2936
2987
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2937
2988
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
2938
2989
  transports_version_send: [:rest]
2939
2990
 
2991
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2940
2992
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2941
2993
 
2942
2994
  options.apply_defaults timeout: @config.rpcs.get_space_read_state.timeout,
@@ -3042,12 +3094,13 @@ module Google
3042
3094
  # Customize the options with defaults
3043
3095
  call_metadata = @config.rpcs.update_space_read_state.metadata.to_h
3044
3096
 
3045
- # Set x-goog-api-client and x-goog-user-project headers
3097
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3046
3098
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3047
3099
  lib_name: @config.lib_name, lib_version: @config.lib_version,
3048
3100
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
3049
3101
  transports_version_send: [:rest]
3050
3102
 
3103
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3051
3104
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3052
3105
 
3053
3106
  options.apply_defaults timeout: @config.rpcs.update_space_read_state.timeout,
@@ -3141,12 +3194,13 @@ module Google
3141
3194
  # Customize the options with defaults
3142
3195
  call_metadata = @config.rpcs.get_thread_read_state.metadata.to_h
3143
3196
 
3144
- # Set x-goog-api-client and x-goog-user-project headers
3197
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3145
3198
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3146
3199
  lib_name: @config.lib_name, lib_version: @config.lib_version,
3147
3200
  gapic_version: ::Google::Apps::Chat::V1::VERSION,
3148
3201
  transports_version_send: [:rest]
3149
3202
 
3203
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3150
3204
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3151
3205
 
3152
3206
  options.apply_defaults timeout: @config.rpcs.get_thread_read_state.timeout,
@@ -21,7 +21,7 @@ module Google
21
21
  module Apps
22
22
  module Chat
23
23
  module V1
24
- VERSION = "0.1.1"
24
+ VERSION = "0.1.2"
25
25
  end
26
26
  end
27
27
  end
@@ -204,6 +204,17 @@ module Google
204
204
  # you can add the user to the space by setting the `membership.member.name`
205
205
  # to `users/user@example.com` or `users/123456789`.
206
206
  #
207
+ # To specify the Google groups to add, add memberships with the
208
+ # appropriate `membership.group_member.name`. To add or invite a Google
209
+ # group, use `groups/{group}`, where `{group}` is the `id` for the group from
210
+ # the Cloud Identity Groups API. For example, you can use [Cloud Identity
211
+ # Groups lookup
212
+ # API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup)
213
+ # to retrieve the ID `123456789` for group email `group@example.com`, then
214
+ # you can add the group to the space by setting the
215
+ # `membership.group_member.name` to `groups/123456789`. Group email is not
216
+ # supported, and Google groups can only be added as members in named spaces.
217
+ #
207
218
  # For a named space or group chat, if the caller blocks, or is blocked
208
219
  # by some members, or doesn't have permission to add some members, then
209
220
  # those members aren't added to the created space.
@@ -289,7 +300,8 @@ module Google
289
300
  # authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
290
301
  #
291
302
  # To specify the member to add, set the `membership.member.name` for the
292
- # human or app member.
303
+ # human or app member, or set the `membership.group_member.name` for the
304
+ # group member.
293
305
  #
294
306
  # - To add the calling app to a space or a direct message between two human
295
307
  # users, use `users/app`. Unable to add other
@@ -302,6 +314,15 @@ module Google
302
314
  # profile ID for `user@example.com` is `123456789`, you can add the user to
303
315
  # the space by setting the `membership.member.name` to
304
316
  # `users/user@example.com` or `users/123456789`.
317
+ #
318
+ # - To add or invite a Google group in a named space, use
319
+ # `groups/{group}`, where `{group}` is the `id` for the group from the Cloud
320
+ # Identity Groups API. For example, you can use [Cloud Identity Groups lookup
321
+ # API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup)
322
+ # to retrieve the ID `123456789` for group email `group@example.com`, then
323
+ # you can add or invite the group to a named space by setting the
324
+ # `membership.group_member.name` to `groups/123456789`. Group email is not
325
+ # supported, and Google groups can only be added as members in named spaces.
305
326
  rpc :CreateMembership, ::Google::Apps::Chat::V1::CreateMembershipRequest, ::Google::Apps::Chat::V1::Membership
306
327
  # Updates a membership. For an example, see [Update a user's membership in
307
328
  # a space](https://developers.google.com/workspace/chat/update-members).
@@ -48,8 +48,6 @@ module Google
48
48
  # @!attribute [rw] group_member
49
49
  # @return [::Google::Apps::Chat::V1::Group]
50
50
  # The Google Group the membership corresponds to.
51
- # Only supports read operations. Other operations, like
52
- # creating or updating a membership, aren't currently supported.
53
51
  # @!attribute [rw] create_time
54
52
  # @return [::Google::Protobuf::Timestamp]
55
53
  # Optional. Immutable. The creation time of the membership, such as when a
@@ -57,8 +57,8 @@ module Google
57
57
  # authenticated user returns an error.
58
58
  # @!attribute [rw] memberships
59
59
  # @return [::Array<::Google::Apps::Chat::V1::Membership>]
60
- # Optional. The Google Chat users to invite to join the space. Omit the
61
- # calling user, as they are added automatically.
60
+ # Optional. The Google Chat users or groups to invite to join the space. Omit
61
+ # the calling user, as they are added automatically.
62
62
  #
63
63
  # The set currently allows up to 20 memberships (in addition to the caller).
64
64
  #
@@ -71,6 +71,10 @@ module Google
71
71
  # To invite Gmail users or users from external Google Workspace domains,
72
72
  # user's email must be used for `{user}`.
73
73
  #
74
+ # For Google group membership, the `Membership.group_member` field must
75
+ # contain a `group` with `name` populated (format `groups/{group}`). You
76
+ # can only add Google groups when setting `Space.spaceType` to `SPACE`.
77
+ #
74
78
  # Optional when setting `Space.spaceType` to `SPACE`.
75
79
  #
76
80
  # Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apps-chat-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-14 00:00:00.000000000 Z
11
+ date: 2024-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common