google-apps-chat-v1 0.27.0 → 0.28.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 +292 -0
- data/lib/google/apps/chat/v1/chat_service/rest/client.rb +285 -0
- data/lib/google/apps/chat/v1/chat_service/rest/service_stub.rb +62 -0
- data/lib/google/apps/chat/v1/version.rb +1 -1
- data/lib/google/chat/v1/chat_service_pb.rb +1 -1
- data/lib/google/chat/v1/chat_service_services_pb.rb +28 -0
- data/lib/google/chat/v1/message_pb.rb +6 -1
- data/proto_docs/google/chat/v1/message.rb +242 -7
- data/proto_docs/google/chat/v1/space.rb +8 -5
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1861e365a7c4f5d3ce0ae6a625179734b81824c00c63395ef257169ce20c005e
|
|
4
|
+
data.tar.gz: 7fa751aeb695d45b5e6bc54fc8edab0c4387b87e95b8e6a7dbe060facc50d9b8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 466bd266329ec0414fdd8e4df1926f2261bfad840d9d11457ab05f1d5736d291627df3291301a4d8a56000c7dcab6f4dc46c21456029e1d8c8166ce28fe4c425
|
|
7
|
+
data.tar.gz: bc240045e3aeebda768342eeffd5b9fb8e2087ecc3dc2b1f97df54f092cdb022b24b5bbbf67f76e7d543fc3b70b540eed288db9d51986a12406d09961ae80413
|
|
@@ -106,6 +106,11 @@ module Google
|
|
|
106
106
|
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
default_config.rpcs.search_messages.timeout = 30.0
|
|
110
|
+
default_config.rpcs.search_messages.retry_policy = {
|
|
111
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
|
112
|
+
}
|
|
113
|
+
|
|
109
114
|
default_config.rpcs.get_attachment.timeout = 30.0
|
|
110
115
|
default_config.rpcs.get_attachment.retry_policy = {
|
|
111
116
|
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
|
@@ -1500,6 +1505,286 @@ module Google
|
|
|
1500
1505
|
raise ::Google::Cloud::Error.from_error(e)
|
|
1501
1506
|
end
|
|
1502
1507
|
|
|
1508
|
+
##
|
|
1509
|
+
# Searches for messages in Google Chat that the calling user has access to.
|
|
1510
|
+
# Returns a list of messages matching the search criteria.
|
|
1511
|
+
#
|
|
1512
|
+
# To search across all spaces the user has access to, set `parent` to
|
|
1513
|
+
# `spaces/-`. Using any other value for `parent` results in an
|
|
1514
|
+
# `INVALID_ARGUMENT` error. The returned messages have their `name` field
|
|
1515
|
+
# populated with the full resource name, which includes the specific `space`
|
|
1516
|
+
# in which the message resides.
|
|
1517
|
+
#
|
|
1518
|
+
# This API doesn't return all message types. The types of messages listed
|
|
1519
|
+
# below aren't included in the response. Use
|
|
1520
|
+
# {::Google::Apps::Chat::V1::ChatService::Client#list_messages ListMessages} to list all
|
|
1521
|
+
# messages.
|
|
1522
|
+
#
|
|
1523
|
+
# - Private Messages that are visible to the authenticated user.
|
|
1524
|
+
# - Messages posted by Chat apps in spaces or group chats.
|
|
1525
|
+
# - Messages in a Chat app DM.
|
|
1526
|
+
# - Messages from blocked users.
|
|
1527
|
+
# - Messages in spaces that the caller has muted.
|
|
1528
|
+
#
|
|
1529
|
+
# Requires [user
|
|
1530
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
1531
|
+
# with one of the following [authorization
|
|
1532
|
+
# scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1533
|
+
#
|
|
1534
|
+
# - `https://www.googleapis.com/auth/chat.messages.readonly`
|
|
1535
|
+
# - `https://www.googleapis.com/auth/chat.messages`
|
|
1536
|
+
#
|
|
1537
|
+
# @overload search_messages(request, options = nil)
|
|
1538
|
+
# Pass arguments to `search_messages` via a request object, either of type
|
|
1539
|
+
# {::Google::Apps::Chat::V1::SearchMessagesRequest} or an equivalent Hash.
|
|
1540
|
+
#
|
|
1541
|
+
# @param request [::Google::Apps::Chat::V1::SearchMessagesRequest, ::Hash]
|
|
1542
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1543
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1544
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1545
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1546
|
+
#
|
|
1547
|
+
# @overload search_messages(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, view: nil)
|
|
1548
|
+
# Pass arguments to `search_messages` via keyword arguments. Note that at
|
|
1549
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1550
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1551
|
+
#
|
|
1552
|
+
# @param parent [::String]
|
|
1553
|
+
# Required. The resource name of the space to search within.
|
|
1554
|
+
#
|
|
1555
|
+
# To search across all spaces the user has access to, set this field to
|
|
1556
|
+
# `spaces/-`. Using any other value for `parent` results in an
|
|
1557
|
+
# `INVALID_ARGUMENT` error.
|
|
1558
|
+
#
|
|
1559
|
+
# To limit the search to one or more spaces, use `space.name` or
|
|
1560
|
+
# `space.display_name` in the `filter`.
|
|
1561
|
+
# @param filter [::String]
|
|
1562
|
+
# Required. A search query.
|
|
1563
|
+
#
|
|
1564
|
+
# The query can specify one or more search keywords, which are used to filter
|
|
1565
|
+
# the results,
|
|
1566
|
+
#
|
|
1567
|
+
# You can also filter the results using the following message fields:
|
|
1568
|
+
#
|
|
1569
|
+
# - `create_time`: Accepts a timestamp in
|
|
1570
|
+
# [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the
|
|
1571
|
+
# supported comparison operators are: `<` and `>=`.
|
|
1572
|
+
# - `sender.name`: The resource name of the sender (`users/{user}`). Only
|
|
1573
|
+
# supports `=`. You can use the e-mail as an alias for `{user}`. For
|
|
1574
|
+
# example, `users/example@gmail.com`, where `example@gmail.com` is the
|
|
1575
|
+
# e-mail of the Google Chat user.
|
|
1576
|
+
# - `space.name`: The resource name of the space where the message is posted.
|
|
1577
|
+
# (`spaces/{space}`). Only supports `=`. If this filter is not set, the
|
|
1578
|
+
# search is performed across all direct messages and spaces the user has
|
|
1579
|
+
# access to as a space member.
|
|
1580
|
+
# - `space.display_name`: Supports the operator `:` (has) and filters spaces
|
|
1581
|
+
# based on a partial match of their display name. Results are limited to
|
|
1582
|
+
# the top five space matches. For example, `space.display_name:Project`
|
|
1583
|
+
# searches for messages in the top five spaces that contain the word
|
|
1584
|
+
# "Project" in their display names.
|
|
1585
|
+
# - `attachment`: Supports the operator `:*` (has any) to check for the
|
|
1586
|
+
# presence of attachments. If `attachment:*` is specified, only messages
|
|
1587
|
+
# that have at least one attachment are returned.
|
|
1588
|
+
# - `annotations.user_mentions.user.name`: The resource name of the mentioned
|
|
1589
|
+
# user (`users/{user}`). Only supports `:` (has). For example:
|
|
1590
|
+
# `annotations.user_mentions.user.name:"users/1234567890"` returns only
|
|
1591
|
+
# messages that contain a mention to the specified user. Alternatively, the
|
|
1592
|
+
# alias `me` can be used to filter for messages that mention the caller
|
|
1593
|
+
# user, for example: `annotations.user_mentions.user.name:users/me`. You
|
|
1594
|
+
# can also use the e-mail as an alias for `{user}`, for example,
|
|
1595
|
+
# `users/example@gmail.com`.
|
|
1596
|
+
#
|
|
1597
|
+
# For advanced filtering, the following functions are also available:
|
|
1598
|
+
#
|
|
1599
|
+
# - `has_link()`: Returns only messages that have at least one hyperlink in
|
|
1600
|
+
# the message text.
|
|
1601
|
+
# - `is_unread()`: Filters out messages that have been read by the calling
|
|
1602
|
+
# user.
|
|
1603
|
+
#
|
|
1604
|
+
# Using the `space.display_name` filter requires that the calling credentials
|
|
1605
|
+
# include one of the following [authorization
|
|
1606
|
+
# scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1607
|
+
#
|
|
1608
|
+
# - `https://www.googleapis.com/auth/chat.spaces.readonly`
|
|
1609
|
+
# - `https://www.googleapis.com/auth/chat.spaces`
|
|
1610
|
+
#
|
|
1611
|
+
# Using the `is_unread()` filter requires that the calling credentials
|
|
1612
|
+
# include one of the following [authorization
|
|
1613
|
+
# scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1614
|
+
#
|
|
1615
|
+
# - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
|
|
1616
|
+
# - `https://www.googleapis.com/auth/chat.users.readstate`
|
|
1617
|
+
#
|
|
1618
|
+
#
|
|
1619
|
+
# Across different fields, only `AND` operators are supported. A valid
|
|
1620
|
+
# example is `sender.name = "users/1234567890" AND is_unread()`. The word
|
|
1621
|
+
# `AND` is optional and is implied if omitted. For example, `sender.name =
|
|
1622
|
+
# "users/1234567890" is_unread()` is valid and is equivalent to the previous
|
|
1623
|
+
# example. An invalid example is `sender.name = "users/1234567890" OR
|
|
1624
|
+
# is_unread()` because `OR` is not supported between different fields.
|
|
1625
|
+
#
|
|
1626
|
+
# Among the same field:
|
|
1627
|
+
#
|
|
1628
|
+
# - `create_time` supports only `AND`, and can only be used to represent
|
|
1629
|
+
# an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND
|
|
1630
|
+
# create_time < "2023-01-01T00:00:00+00:00"`.
|
|
1631
|
+
# - `sender.name` supports only the `OR` operator, for example:
|
|
1632
|
+
# `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`.
|
|
1633
|
+
# - `space.name` supports only the `OR` operator, for example:
|
|
1634
|
+
# `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`.
|
|
1635
|
+
# - `space.display_name` supports the operators `AND` and `OR`, but not a
|
|
1636
|
+
# mix of both. For example:
|
|
1637
|
+
# `space.display_name:Project AND space.display_name:Tasks` returns
|
|
1638
|
+
# messages that are in spaces with display names containing both `Project`
|
|
1639
|
+
# and `Tasks`, whereas
|
|
1640
|
+
# `space.display_name:Project OR space.display_name:Tasks` returns messages
|
|
1641
|
+
# that are in spaces with display names containing either `Project` or
|
|
1642
|
+
# `Tasks` or both.
|
|
1643
|
+
# - `annotations.user_mentions.user.name` supports the operators `AND` and
|
|
1644
|
+
# `OR`, but not a mix of both. For example:
|
|
1645
|
+
# `annotations.user_mentions.user.name:"users/1234567890" AND
|
|
1646
|
+
# annotations.user_mentions.user.name:"users/0987654321"` returns only
|
|
1647
|
+
# messages that mentions both users, whereas
|
|
1648
|
+
# `annotations.user_mentions.user.name:"users/1234567890" OR
|
|
1649
|
+
# annotations.user_mentions.user.name:"users/0987654321"` returns messages
|
|
1650
|
+
# that mention either user or both.
|
|
1651
|
+
#
|
|
1652
|
+
# Parentheses are required to disambiguate operator precedence when combining
|
|
1653
|
+
# `AND` and `OR` operators in the same query. For example:
|
|
1654
|
+
# `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`.
|
|
1655
|
+
# Otherwise, parentheses are optional.
|
|
1656
|
+
#
|
|
1657
|
+
# The following example queries are valid:
|
|
1658
|
+
#
|
|
1659
|
+
# ```
|
|
1660
|
+
# "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
|
|
1661
|
+
#
|
|
1662
|
+
# sender.name = "users/example@gmail.com"
|
|
1663
|
+
#
|
|
1664
|
+
# annotations.user_mentions.user.name:"users/0987654321"
|
|
1665
|
+
#
|
|
1666
|
+
# attachment:* AND space.name = "spaces/ABCDEFGH"
|
|
1667
|
+
#
|
|
1668
|
+
# tasks AND is_unread() AND sender.name = "users/1234567890"
|
|
1669
|
+
#
|
|
1670
|
+
# "things to do" "urgent"
|
|
1671
|
+
#
|
|
1672
|
+
# (sender.name = "users/1234567890")
|
|
1673
|
+
# AND (create_time < "2023-05-01T00:00:00Z")
|
|
1674
|
+
#
|
|
1675
|
+
# tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
|
|
1676
|
+
#
|
|
1677
|
+
# "project one" is_unread()
|
|
1678
|
+
#
|
|
1679
|
+
# space.display_name:Project tasks
|
|
1680
|
+
# ```
|
|
1681
|
+
#
|
|
1682
|
+
# The maximum query length is 1,000 characters.
|
|
1683
|
+
#
|
|
1684
|
+
# Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
1685
|
+
# error.
|
|
1686
|
+
# @param page_size [::Integer]
|
|
1687
|
+
# Optional. The maximum number of results to return. The service may return
|
|
1688
|
+
# fewer than this value.
|
|
1689
|
+
#
|
|
1690
|
+
# If unspecified, at most 25 are returned.
|
|
1691
|
+
#
|
|
1692
|
+
# The maximum value is 100. If you use a value more than 100, it's
|
|
1693
|
+
# automatically changed to 100.
|
|
1694
|
+
# @param page_token [::String]
|
|
1695
|
+
# Optional. A token, received from the previous search messages call. Provide
|
|
1696
|
+
# this parameter to retrieve the subsequent page.
|
|
1697
|
+
#
|
|
1698
|
+
# When paginating, all other parameters provided should match the call that
|
|
1699
|
+
# provided the page token. Passing different values to the other parameters
|
|
1700
|
+
# might lead to unexpected results.
|
|
1701
|
+
# @param order_by [::String]
|
|
1702
|
+
# Optional. How the results list is ordered.
|
|
1703
|
+
#
|
|
1704
|
+
# Supported attributes to order by are:
|
|
1705
|
+
#
|
|
1706
|
+
# - `create_time`: Sorts the results by the time of the message creation.
|
|
1707
|
+
# Default value.
|
|
1708
|
+
# - `relevance`: Sorts the results by relevance.
|
|
1709
|
+
# [Developer Preview](https://developers.google.com/workspace/preview).
|
|
1710
|
+
#
|
|
1711
|
+
# The default ordering is `create_time desc`. Only a single order per query
|
|
1712
|
+
# (`create_time` or `relevance`) is supported. Only descending order (`desc`)
|
|
1713
|
+
# is supported, and it must be specified after the order attribute.
|
|
1714
|
+
# @param view [::Google::Apps::Chat::V1::SearchMessagesRequest::SearchMessagesView]
|
|
1715
|
+
# Optional. Specifies what kind of search results view to return. The default
|
|
1716
|
+
# is `SEARCH_MESSAGES_VIEW_BASIC`.
|
|
1717
|
+
#
|
|
1718
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1719
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Apps::Chat::V1::SearchMessageResult>]
|
|
1720
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1721
|
+
#
|
|
1722
|
+
# @return [::Gapic::PagedEnumerable<::Google::Apps::Chat::V1::SearchMessageResult>]
|
|
1723
|
+
#
|
|
1724
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1725
|
+
#
|
|
1726
|
+
# @example Basic example
|
|
1727
|
+
# require "google/apps/chat/v1"
|
|
1728
|
+
#
|
|
1729
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1730
|
+
# client = Google::Apps::Chat::V1::ChatService::Client.new
|
|
1731
|
+
#
|
|
1732
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1733
|
+
# request = Google::Apps::Chat::V1::SearchMessagesRequest.new
|
|
1734
|
+
#
|
|
1735
|
+
# # Call the search_messages method.
|
|
1736
|
+
# result = client.search_messages request
|
|
1737
|
+
#
|
|
1738
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
1739
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
1740
|
+
# result.each do |item|
|
|
1741
|
+
# # Each element is of type ::Google::Apps::Chat::V1::SearchMessageResult.
|
|
1742
|
+
# p item
|
|
1743
|
+
# end
|
|
1744
|
+
#
|
|
1745
|
+
def search_messages request, options = nil
|
|
1746
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1747
|
+
|
|
1748
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::SearchMessagesRequest
|
|
1749
|
+
|
|
1750
|
+
# Converts hash and nil to an options object
|
|
1751
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1752
|
+
|
|
1753
|
+
# Customize the options with defaults
|
|
1754
|
+
metadata = @config.rpcs.search_messages.metadata.to_h
|
|
1755
|
+
|
|
1756
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1757
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1758
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1759
|
+
gapic_version: ::Google::Apps::Chat::V1::VERSION
|
|
1760
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1761
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1762
|
+
|
|
1763
|
+
header_params = {}
|
|
1764
|
+
if request.parent
|
|
1765
|
+
header_params["parent"] = request.parent
|
|
1766
|
+
end
|
|
1767
|
+
|
|
1768
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1769
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1770
|
+
|
|
1771
|
+
options.apply_defaults timeout: @config.rpcs.search_messages.timeout,
|
|
1772
|
+
metadata: metadata,
|
|
1773
|
+
retry_policy: @config.rpcs.search_messages.retry_policy
|
|
1774
|
+
|
|
1775
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1776
|
+
metadata: @config.metadata,
|
|
1777
|
+
retry_policy: @config.retry_policy
|
|
1778
|
+
|
|
1779
|
+
@chat_service_stub.call_rpc :search_messages, request, options: options do |response, operation|
|
|
1780
|
+
response = ::Gapic::PagedEnumerable.new @chat_service_stub, :search_messages, request, response, operation, options
|
|
1781
|
+
yield response, operation if block_given?
|
|
1782
|
+
throw :response, response
|
|
1783
|
+
end
|
|
1784
|
+
rescue ::GRPC::BadStatus => e
|
|
1785
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1786
|
+
end
|
|
1787
|
+
|
|
1503
1788
|
##
|
|
1504
1789
|
# Gets the metadata of a message attachment. The attachment data is fetched
|
|
1505
1790
|
# using the [media
|
|
@@ -6855,6 +7140,11 @@ module Google
|
|
|
6855
7140
|
#
|
|
6856
7141
|
attr_reader :delete_message
|
|
6857
7142
|
##
|
|
7143
|
+
# RPC-specific configuration for `search_messages`
|
|
7144
|
+
# @return [::Gapic::Config::Method]
|
|
7145
|
+
#
|
|
7146
|
+
attr_reader :search_messages
|
|
7147
|
+
##
|
|
6858
7148
|
# RPC-specific configuration for `get_attachment`
|
|
6859
7149
|
# @return [::Gapic::Config::Method]
|
|
6860
7150
|
#
|
|
@@ -7076,6 +7366,8 @@ module Google
|
|
|
7076
7366
|
@update_message = ::Gapic::Config::Method.new update_message_config
|
|
7077
7367
|
delete_message_config = parent_rpcs.delete_message if parent_rpcs.respond_to? :delete_message
|
|
7078
7368
|
@delete_message = ::Gapic::Config::Method.new delete_message_config
|
|
7369
|
+
search_messages_config = parent_rpcs.search_messages if parent_rpcs.respond_to? :search_messages
|
|
7370
|
+
@search_messages = ::Gapic::Config::Method.new search_messages_config
|
|
7079
7371
|
get_attachment_config = parent_rpcs.get_attachment if parent_rpcs.respond_to? :get_attachment
|
|
7080
7372
|
@get_attachment = ::Gapic::Config::Method.new get_attachment_config
|
|
7081
7373
|
upload_attachment_config = parent_rpcs.upload_attachment if parent_rpcs.respond_to? :upload_attachment
|
|
@@ -108,6 +108,11 @@ module Google
|
|
|
108
108
|
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
default_config.rpcs.search_messages.timeout = 30.0
|
|
112
|
+
default_config.rpcs.search_messages.retry_policy = {
|
|
113
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
|
114
|
+
}
|
|
115
|
+
|
|
111
116
|
default_config.rpcs.get_attachment.timeout = 30.0
|
|
112
117
|
default_config.rpcs.get_attachment.retry_policy = {
|
|
113
118
|
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
|
@@ -1444,6 +1449,279 @@ module Google
|
|
|
1444
1449
|
raise ::Google::Cloud::Error.from_error(e)
|
|
1445
1450
|
end
|
|
1446
1451
|
|
|
1452
|
+
##
|
|
1453
|
+
# Searches for messages in Google Chat that the calling user has access to.
|
|
1454
|
+
# Returns a list of messages matching the search criteria.
|
|
1455
|
+
#
|
|
1456
|
+
# To search across all spaces the user has access to, set `parent` to
|
|
1457
|
+
# `spaces/-`. Using any other value for `parent` results in an
|
|
1458
|
+
# `INVALID_ARGUMENT` error. The returned messages have their `name` field
|
|
1459
|
+
# populated with the full resource name, which includes the specific `space`
|
|
1460
|
+
# in which the message resides.
|
|
1461
|
+
#
|
|
1462
|
+
# This API doesn't return all message types. The types of messages listed
|
|
1463
|
+
# below aren't included in the response. Use
|
|
1464
|
+
# {::Google::Apps::Chat::V1::ChatService::Rest::Client#list_messages ListMessages} to list all
|
|
1465
|
+
# messages.
|
|
1466
|
+
#
|
|
1467
|
+
# - Private Messages that are visible to the authenticated user.
|
|
1468
|
+
# - Messages posted by Chat apps in spaces or group chats.
|
|
1469
|
+
# - Messages in a Chat app DM.
|
|
1470
|
+
# - Messages from blocked users.
|
|
1471
|
+
# - Messages in spaces that the caller has muted.
|
|
1472
|
+
#
|
|
1473
|
+
# Requires [user
|
|
1474
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
1475
|
+
# with one of the following [authorization
|
|
1476
|
+
# scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1477
|
+
#
|
|
1478
|
+
# - `https://www.googleapis.com/auth/chat.messages.readonly`
|
|
1479
|
+
# - `https://www.googleapis.com/auth/chat.messages`
|
|
1480
|
+
#
|
|
1481
|
+
# @overload search_messages(request, options = nil)
|
|
1482
|
+
# Pass arguments to `search_messages` via a request object, either of type
|
|
1483
|
+
# {::Google::Apps::Chat::V1::SearchMessagesRequest} or an equivalent Hash.
|
|
1484
|
+
#
|
|
1485
|
+
# @param request [::Google::Apps::Chat::V1::SearchMessagesRequest, ::Hash]
|
|
1486
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1487
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1488
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1489
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1490
|
+
#
|
|
1491
|
+
# @overload search_messages(parent: nil, filter: nil, page_size: nil, page_token: nil, order_by: nil, view: nil)
|
|
1492
|
+
# Pass arguments to `search_messages` via keyword arguments. Note that at
|
|
1493
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1494
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1495
|
+
#
|
|
1496
|
+
# @param parent [::String]
|
|
1497
|
+
# Required. The resource name of the space to search within.
|
|
1498
|
+
#
|
|
1499
|
+
# To search across all spaces the user has access to, set this field to
|
|
1500
|
+
# `spaces/-`. Using any other value for `parent` results in an
|
|
1501
|
+
# `INVALID_ARGUMENT` error.
|
|
1502
|
+
#
|
|
1503
|
+
# To limit the search to one or more spaces, use `space.name` or
|
|
1504
|
+
# `space.display_name` in the `filter`.
|
|
1505
|
+
# @param filter [::String]
|
|
1506
|
+
# Required. A search query.
|
|
1507
|
+
#
|
|
1508
|
+
# The query can specify one or more search keywords, which are used to filter
|
|
1509
|
+
# the results,
|
|
1510
|
+
#
|
|
1511
|
+
# You can also filter the results using the following message fields:
|
|
1512
|
+
#
|
|
1513
|
+
# - `create_time`: Accepts a timestamp in
|
|
1514
|
+
# [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the
|
|
1515
|
+
# supported comparison operators are: `<` and `>=`.
|
|
1516
|
+
# - `sender.name`: The resource name of the sender (`users/{user}`). Only
|
|
1517
|
+
# supports `=`. You can use the e-mail as an alias for `{user}`. For
|
|
1518
|
+
# example, `users/example@gmail.com`, where `example@gmail.com` is the
|
|
1519
|
+
# e-mail of the Google Chat user.
|
|
1520
|
+
# - `space.name`: The resource name of the space where the message is posted.
|
|
1521
|
+
# (`spaces/{space}`). Only supports `=`. If this filter is not set, the
|
|
1522
|
+
# search is performed across all direct messages and spaces the user has
|
|
1523
|
+
# access to as a space member.
|
|
1524
|
+
# - `space.display_name`: Supports the operator `:` (has) and filters spaces
|
|
1525
|
+
# based on a partial match of their display name. Results are limited to
|
|
1526
|
+
# the top five space matches. For example, `space.display_name:Project`
|
|
1527
|
+
# searches for messages in the top five spaces that contain the word
|
|
1528
|
+
# "Project" in their display names.
|
|
1529
|
+
# - `attachment`: Supports the operator `:*` (has any) to check for the
|
|
1530
|
+
# presence of attachments. If `attachment:*` is specified, only messages
|
|
1531
|
+
# that have at least one attachment are returned.
|
|
1532
|
+
# - `annotations.user_mentions.user.name`: The resource name of the mentioned
|
|
1533
|
+
# user (`users/{user}`). Only supports `:` (has). For example:
|
|
1534
|
+
# `annotations.user_mentions.user.name:"users/1234567890"` returns only
|
|
1535
|
+
# messages that contain a mention to the specified user. Alternatively, the
|
|
1536
|
+
# alias `me` can be used to filter for messages that mention the caller
|
|
1537
|
+
# user, for example: `annotations.user_mentions.user.name:users/me`. You
|
|
1538
|
+
# can also use the e-mail as an alias for `{user}`, for example,
|
|
1539
|
+
# `users/example@gmail.com`.
|
|
1540
|
+
#
|
|
1541
|
+
# For advanced filtering, the following functions are also available:
|
|
1542
|
+
#
|
|
1543
|
+
# - `has_link()`: Returns only messages that have at least one hyperlink in
|
|
1544
|
+
# the message text.
|
|
1545
|
+
# - `is_unread()`: Filters out messages that have been read by the calling
|
|
1546
|
+
# user.
|
|
1547
|
+
#
|
|
1548
|
+
# Using the `space.display_name` filter requires that the calling credentials
|
|
1549
|
+
# include one of the following [authorization
|
|
1550
|
+
# scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1551
|
+
#
|
|
1552
|
+
# - `https://www.googleapis.com/auth/chat.spaces.readonly`
|
|
1553
|
+
# - `https://www.googleapis.com/auth/chat.spaces`
|
|
1554
|
+
#
|
|
1555
|
+
# Using the `is_unread()` filter requires that the calling credentials
|
|
1556
|
+
# include one of the following [authorization
|
|
1557
|
+
# scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1558
|
+
#
|
|
1559
|
+
# - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
|
|
1560
|
+
# - `https://www.googleapis.com/auth/chat.users.readstate`
|
|
1561
|
+
#
|
|
1562
|
+
#
|
|
1563
|
+
# Across different fields, only `AND` operators are supported. A valid
|
|
1564
|
+
# example is `sender.name = "users/1234567890" AND is_unread()`. The word
|
|
1565
|
+
# `AND` is optional and is implied if omitted. For example, `sender.name =
|
|
1566
|
+
# "users/1234567890" is_unread()` is valid and is equivalent to the previous
|
|
1567
|
+
# example. An invalid example is `sender.name = "users/1234567890" OR
|
|
1568
|
+
# is_unread()` because `OR` is not supported between different fields.
|
|
1569
|
+
#
|
|
1570
|
+
# Among the same field:
|
|
1571
|
+
#
|
|
1572
|
+
# - `create_time` supports only `AND`, and can only be used to represent
|
|
1573
|
+
# an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND
|
|
1574
|
+
# create_time < "2023-01-01T00:00:00+00:00"`.
|
|
1575
|
+
# - `sender.name` supports only the `OR` operator, for example:
|
|
1576
|
+
# `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`.
|
|
1577
|
+
# - `space.name` supports only the `OR` operator, for example:
|
|
1578
|
+
# `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`.
|
|
1579
|
+
# - `space.display_name` supports the operators `AND` and `OR`, but not a
|
|
1580
|
+
# mix of both. For example:
|
|
1581
|
+
# `space.display_name:Project AND space.display_name:Tasks` returns
|
|
1582
|
+
# messages that are in spaces with display names containing both `Project`
|
|
1583
|
+
# and `Tasks`, whereas
|
|
1584
|
+
# `space.display_name:Project OR space.display_name:Tasks` returns messages
|
|
1585
|
+
# that are in spaces with display names containing either `Project` or
|
|
1586
|
+
# `Tasks` or both.
|
|
1587
|
+
# - `annotations.user_mentions.user.name` supports the operators `AND` and
|
|
1588
|
+
# `OR`, but not a mix of both. For example:
|
|
1589
|
+
# `annotations.user_mentions.user.name:"users/1234567890" AND
|
|
1590
|
+
# annotations.user_mentions.user.name:"users/0987654321"` returns only
|
|
1591
|
+
# messages that mentions both users, whereas
|
|
1592
|
+
# `annotations.user_mentions.user.name:"users/1234567890" OR
|
|
1593
|
+
# annotations.user_mentions.user.name:"users/0987654321"` returns messages
|
|
1594
|
+
# that mention either user or both.
|
|
1595
|
+
#
|
|
1596
|
+
# Parentheses are required to disambiguate operator precedence when combining
|
|
1597
|
+
# `AND` and `OR` operators in the same query. For example:
|
|
1598
|
+
# `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`.
|
|
1599
|
+
# Otherwise, parentheses are optional.
|
|
1600
|
+
#
|
|
1601
|
+
# The following example queries are valid:
|
|
1602
|
+
#
|
|
1603
|
+
# ```
|
|
1604
|
+
# "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
|
|
1605
|
+
#
|
|
1606
|
+
# sender.name = "users/example@gmail.com"
|
|
1607
|
+
#
|
|
1608
|
+
# annotations.user_mentions.user.name:"users/0987654321"
|
|
1609
|
+
#
|
|
1610
|
+
# attachment:* AND space.name = "spaces/ABCDEFGH"
|
|
1611
|
+
#
|
|
1612
|
+
# tasks AND is_unread() AND sender.name = "users/1234567890"
|
|
1613
|
+
#
|
|
1614
|
+
# "things to do" "urgent"
|
|
1615
|
+
#
|
|
1616
|
+
# (sender.name = "users/1234567890")
|
|
1617
|
+
# AND (create_time < "2023-05-01T00:00:00Z")
|
|
1618
|
+
#
|
|
1619
|
+
# tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
|
|
1620
|
+
#
|
|
1621
|
+
# "project one" is_unread()
|
|
1622
|
+
#
|
|
1623
|
+
# space.display_name:Project tasks
|
|
1624
|
+
# ```
|
|
1625
|
+
#
|
|
1626
|
+
# The maximum query length is 1,000 characters.
|
|
1627
|
+
#
|
|
1628
|
+
# Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
1629
|
+
# error.
|
|
1630
|
+
# @param page_size [::Integer]
|
|
1631
|
+
# Optional. The maximum number of results to return. The service may return
|
|
1632
|
+
# fewer than this value.
|
|
1633
|
+
#
|
|
1634
|
+
# If unspecified, at most 25 are returned.
|
|
1635
|
+
#
|
|
1636
|
+
# The maximum value is 100. If you use a value more than 100, it's
|
|
1637
|
+
# automatically changed to 100.
|
|
1638
|
+
# @param page_token [::String]
|
|
1639
|
+
# Optional. A token, received from the previous search messages call. Provide
|
|
1640
|
+
# this parameter to retrieve the subsequent page.
|
|
1641
|
+
#
|
|
1642
|
+
# When paginating, all other parameters provided should match the call that
|
|
1643
|
+
# provided the page token. Passing different values to the other parameters
|
|
1644
|
+
# might lead to unexpected results.
|
|
1645
|
+
# @param order_by [::String]
|
|
1646
|
+
# Optional. How the results list is ordered.
|
|
1647
|
+
#
|
|
1648
|
+
# Supported attributes to order by are:
|
|
1649
|
+
#
|
|
1650
|
+
# - `create_time`: Sorts the results by the time of the message creation.
|
|
1651
|
+
# Default value.
|
|
1652
|
+
# - `relevance`: Sorts the results by relevance.
|
|
1653
|
+
# [Developer Preview](https://developers.google.com/workspace/preview).
|
|
1654
|
+
#
|
|
1655
|
+
# The default ordering is `create_time desc`. Only a single order per query
|
|
1656
|
+
# (`create_time` or `relevance`) is supported. Only descending order (`desc`)
|
|
1657
|
+
# is supported, and it must be specified after the order attribute.
|
|
1658
|
+
# @param view [::Google::Apps::Chat::V1::SearchMessagesRequest::SearchMessagesView]
|
|
1659
|
+
# Optional. Specifies what kind of search results view to return. The default
|
|
1660
|
+
# is `SEARCH_MESSAGES_VIEW_BASIC`.
|
|
1661
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1662
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Apps::Chat::V1::SearchMessageResult>]
|
|
1663
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1664
|
+
#
|
|
1665
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Apps::Chat::V1::SearchMessageResult>]
|
|
1666
|
+
#
|
|
1667
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1668
|
+
#
|
|
1669
|
+
# @example Basic example
|
|
1670
|
+
# require "google/apps/chat/v1"
|
|
1671
|
+
#
|
|
1672
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1673
|
+
# client = Google::Apps::Chat::V1::ChatService::Rest::Client.new
|
|
1674
|
+
#
|
|
1675
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1676
|
+
# request = Google::Apps::Chat::V1::SearchMessagesRequest.new
|
|
1677
|
+
#
|
|
1678
|
+
# # Call the search_messages method.
|
|
1679
|
+
# result = client.search_messages request
|
|
1680
|
+
#
|
|
1681
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
1682
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
1683
|
+
# result.each do |item|
|
|
1684
|
+
# # Each element is of type ::Google::Apps::Chat::V1::SearchMessageResult.
|
|
1685
|
+
# p item
|
|
1686
|
+
# end
|
|
1687
|
+
#
|
|
1688
|
+
def search_messages request, options = nil
|
|
1689
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1690
|
+
|
|
1691
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Apps::Chat::V1::SearchMessagesRequest
|
|
1692
|
+
|
|
1693
|
+
# Converts hash and nil to an options object
|
|
1694
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1695
|
+
|
|
1696
|
+
# Customize the options with defaults
|
|
1697
|
+
call_metadata = @config.rpcs.search_messages.metadata.to_h
|
|
1698
|
+
|
|
1699
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1700
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1701
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1702
|
+
gapic_version: ::Google::Apps::Chat::V1::VERSION,
|
|
1703
|
+
transports_version_send: [:rest]
|
|
1704
|
+
|
|
1705
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1706
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1707
|
+
|
|
1708
|
+
options.apply_defaults timeout: @config.rpcs.search_messages.timeout,
|
|
1709
|
+
metadata: call_metadata,
|
|
1710
|
+
retry_policy: @config.rpcs.search_messages.retry_policy
|
|
1711
|
+
|
|
1712
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1713
|
+
metadata: @config.metadata,
|
|
1714
|
+
retry_policy: @config.retry_policy
|
|
1715
|
+
|
|
1716
|
+
@chat_service_stub.search_messages request, options do |result, operation|
|
|
1717
|
+
result = ::Gapic::Rest::PagedEnumerable.new @chat_service_stub, :search_messages, "results", request, result, options
|
|
1718
|
+
yield result, operation if block_given?
|
|
1719
|
+
throw :response, result
|
|
1720
|
+
end
|
|
1721
|
+
rescue ::Gapic::Rest::Error => e
|
|
1722
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1723
|
+
end
|
|
1724
|
+
|
|
1447
1725
|
##
|
|
1448
1726
|
# Gets the metadata of a message attachment. The attachment data is fetched
|
|
1449
1727
|
# using the [media
|
|
@@ -6539,6 +6817,11 @@ module Google
|
|
|
6539
6817
|
#
|
|
6540
6818
|
attr_reader :delete_message
|
|
6541
6819
|
##
|
|
6820
|
+
# RPC-specific configuration for `search_messages`
|
|
6821
|
+
# @return [::Gapic::Config::Method]
|
|
6822
|
+
#
|
|
6823
|
+
attr_reader :search_messages
|
|
6824
|
+
##
|
|
6542
6825
|
# RPC-specific configuration for `get_attachment`
|
|
6543
6826
|
# @return [::Gapic::Config::Method]
|
|
6544
6827
|
#
|
|
@@ -6760,6 +7043,8 @@ module Google
|
|
|
6760
7043
|
@update_message = ::Gapic::Config::Method.new update_message_config
|
|
6761
7044
|
delete_message_config = parent_rpcs.delete_message if parent_rpcs.respond_to? :delete_message
|
|
6762
7045
|
@delete_message = ::Gapic::Config::Method.new delete_message_config
|
|
7046
|
+
search_messages_config = parent_rpcs.search_messages if parent_rpcs.respond_to? :search_messages
|
|
7047
|
+
@search_messages = ::Gapic::Config::Method.new search_messages_config
|
|
6763
7048
|
get_attachment_config = parent_rpcs.get_attachment if parent_rpcs.respond_to? :get_attachment
|
|
6764
7049
|
@get_attachment = ::Gapic::Config::Method.new get_attachment_config
|
|
6765
7050
|
upload_attachment_config = parent_rpcs.upload_attachment if parent_rpcs.respond_to? :upload_attachment
|
|
@@ -353,6 +353,46 @@ module Google
|
|
|
353
353
|
end
|
|
354
354
|
end
|
|
355
355
|
|
|
356
|
+
##
|
|
357
|
+
# Baseline implementation for the search_messages REST call
|
|
358
|
+
#
|
|
359
|
+
# @param request_pb [::Google::Apps::Chat::V1::SearchMessagesRequest]
|
|
360
|
+
# A request object representing the call parameters. Required.
|
|
361
|
+
# @param options [::Gapic::CallOptions]
|
|
362
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
363
|
+
#
|
|
364
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
365
|
+
# @yieldparam result [::Google::Apps::Chat::V1::SearchMessagesResponse]
|
|
366
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
367
|
+
#
|
|
368
|
+
# @return [::Google::Apps::Chat::V1::SearchMessagesResponse]
|
|
369
|
+
# A result object deserialized from the server's reply
|
|
370
|
+
def search_messages request_pb, options = nil
|
|
371
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
372
|
+
|
|
373
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_search_messages_request request_pb
|
|
374
|
+
query_string_params = if query_string_params.any?
|
|
375
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
376
|
+
else
|
|
377
|
+
{}
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
response = @client_stub.make_http_request(
|
|
381
|
+
verb,
|
|
382
|
+
uri: uri,
|
|
383
|
+
body: body || "",
|
|
384
|
+
params: query_string_params,
|
|
385
|
+
method_name: "search_messages",
|
|
386
|
+
options: options
|
|
387
|
+
)
|
|
388
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
|
389
|
+
result = ::Google::Apps::Chat::V1::SearchMessagesResponse.decode_json response.body, ignore_unknown_fields: true
|
|
390
|
+
catch :response do
|
|
391
|
+
yield result, operation if block_given?
|
|
392
|
+
result
|
|
393
|
+
end
|
|
394
|
+
end
|
|
395
|
+
|
|
356
396
|
##
|
|
357
397
|
# Baseline implementation for the get_attachment REST call
|
|
358
398
|
#
|
|
@@ -2150,6 +2190,28 @@ module Google
|
|
|
2150
2190
|
transcoder.transcode request_pb
|
|
2151
2191
|
end
|
|
2152
2192
|
|
|
2193
|
+
##
|
|
2194
|
+
# @private
|
|
2195
|
+
#
|
|
2196
|
+
# GRPC transcoding helper method for the search_messages REST call
|
|
2197
|
+
#
|
|
2198
|
+
# @param request_pb [::Google::Apps::Chat::V1::SearchMessagesRequest]
|
|
2199
|
+
# A request object representing the call parameters. Required.
|
|
2200
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
2201
|
+
# Uri, Body, Query string parameters
|
|
2202
|
+
def self.transcode_search_messages_request request_pb
|
|
2203
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
2204
|
+
.with_bindings(
|
|
2205
|
+
uri_method: :post,
|
|
2206
|
+
uri_template: "/v1/{parent}/messages:search",
|
|
2207
|
+
body: "*",
|
|
2208
|
+
matches: [
|
|
2209
|
+
["parent", %r{^spaces/[^/]+/?$}, false]
|
|
2210
|
+
]
|
|
2211
|
+
)
|
|
2212
|
+
transcoder.transcode request_pb
|
|
2213
|
+
end
|
|
2214
|
+
|
|
2153
2215
|
##
|
|
2154
2216
|
# @private
|
|
2155
2217
|
#
|
|
@@ -21,7 +21,7 @@ require 'google/chat/v1/thread_read_state_pb'
|
|
|
21
21
|
require 'google/protobuf/empty_pb'
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
descriptor_data = "\n!google/chat/v1/chat_service.proto\x12\x0egoogle.chat.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/chat/v1/attachment.proto\x1a!google/chat/v1/availability.proto\x1a\x1fgoogle/chat/v1/membership.proto\x1a\x1cgoogle/chat/v1/message.proto\x1a\x1dgoogle/chat/v1/reaction.proto\x1a\x1cgoogle/chat/v1/section.proto\x1a\x1agoogle/chat/v1/space.proto\x1a google/chat/v1/space_event.proto\x1a/google/chat/v1/space_notification_setting.proto\x1a%google/chat/v1/space_read_state.proto\x1a google/chat/v1/space_setup.proto\x1a&google/chat/v1/thread_read_state.proto\x1a\x1bgoogle/protobuf/empty.proto2\xc6G\n\x0b\x43hatService\x12\x9b\x01\n\rCreateMessage\x12$.google.chat.v1.CreateMessageRequest\x1a\x17.google.chat.v1.Message\"K\xda\x41\x19parent,message,message_id\x82\xd3\xe4\x93\x02)\"\x1e/v1/{parent=spaces/*}/messages:\x07message\x12\x8a\x01\n\x0cListMessages\x12#.google.chat.v1.ListMessagesRequest\x1a$.google.chat.v1.ListMessagesResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=spaces/*}/messages\x12\x92\x01\n\x0fListMemberships\x12&.google.chat.v1.ListMembershipsRequest\x1a\'.google.chat.v1.ListMembershipsResponse\".\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=spaces/*}/members\x12\x7f\n\rGetMembership\x12$.google.chat.v1.GetMembershipRequest\x1a\x1a.google.chat.v1.Membership\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=spaces/*/members/*}\x12w\n\nGetMessage\x12!.google.chat.v1.GetMessageRequest\x1a\x17.google.chat.v1.Message\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{name=spaces/*/messages/*}\x12\xd1\x01\n\rUpdateMessage\x12$.google.chat.v1.UpdateMessageRequest\x1a\x17.google.chat.v1.Message\"\x80\x01\xda\x41\x13message,update_mask\x82\xd3\xe4\x93\x02\x64\x1a&/v1/{message.name=spaces/*/messages/*}:\x07messageZ12&/v1/{message.name=spaces/*/messages/*}:\x07message\x12|\n\rDeleteMessage\x12$.google.chat.v1.DeleteMessageRequest\x1a\x16.google.protobuf.Empty\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=spaces/*/messages/*}\x12\x8e\x01\n\rGetAttachment\x12$.google.chat.v1.GetAttachmentRequest\x1a\x1a.google.chat.v1.Attachment\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=spaces/*/messages/*/attachments/*}\x12\x9a\x01\n\x10UploadAttachment\x12\'.google.chat.v1.UploadAttachmentRequest\x1a(.google.chat.v1.UploadAttachmentResponse\"3\x82\xd3\xe4\x93\x02-\"(/v1/{parent=spaces/*}/attachments:upload:\x01*\x12j\n\nListSpaces\x12!.google.chat.v1.ListSpacesRequest\x1a\".google.chat.v1.ListSpacesResponse\"\x15\xda\x41\x00\x82\xd3\xe4\x93\x02\x0c\x12\n/v1/spaces\x12w\n\x0cSearchSpaces\x12#.google.chat.v1.SearchSpacesRequest\x1a$.google.chat.v1.SearchSpacesResponse\"\x1c\xda\x41\x00\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/spaces:search\x12\x66\n\x08GetSpace\x12\x1f.google.chat.v1.GetSpaceRequest\x1a\x15.google.chat.v1.Space\"\"\xda\x41\x04name\x82\xd3\xe4\x93\x02\x15\x12\x13/v1/{name=spaces/*}\x12k\n\x0b\x43reateSpace\x12\".google.chat.v1.CreateSpaceRequest\x1a\x15.google.chat.v1.Space\"!\xda\x41\x05space\x82\xd3\xe4\x93\x02\x13\"\n/v1/spaces:\x05space\x12\x63\n\nSetUpSpace\x12!.google.chat.v1.SetUpSpaceRequest\x1a\x15.google.chat.v1.Space\"\x1b\x82\xd3\xe4\x93\x02\x15\"\x10/v1/spaces:setup:\x01*\x12\x86\x01\n\x0bUpdateSpace\x12\".google.chat.v1.UpdateSpaceRequest\x1a\x15.google.chat.v1.Space\"<\xda\x41\x11space,update_mask\x82\xd3\xe4\x93\x02\"2\x19/v1/{space.name=spaces/*}:\x05space\x12m\n\x0b\x44\x65leteSpace\x12\".google.chat.v1.DeleteSpaceRequest\x1a\x16.google.protobuf.Empty\"\"\xda\x41\x04name\x82\xd3\xe4\x93\x02\x15*\x13/v1/{name=spaces/*}\x12\x9d\x01\n\x13\x43ompleteImportSpace\x12*.google.chat.v1.CompleteImportSpaceRequest\x1a+.google.chat.v1.CompleteImportSpaceResponse\"-\x82\xd3\xe4\x93\x02\'\"\"/v1/{name=spaces/*}:completeImport:\x01*\x12z\n\x11\x46indDirectMessage\x12(.google.chat.v1.FindDirectMessageRequest\x1a\x15.google.chat.v1.Space\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/spaces:findDirectMessage\x12\x82\x01\n\x0e\x46indGroupChats\x12%.google.chat.v1.FindGroupChatsRequest\x1a&.google.chat.v1.FindGroupChatsResponse\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1/spaces:findGroupChats\x12\x9e\x01\n\x10\x43reateMembership\x12\'.google.chat.v1.CreateMembershipRequest\x1a\x1a.google.chat.v1.Membership\"E\xda\x41\x11parent,membership\x82\xd3\xe4\x93\x02+\"\x1d/v1/{parent=spaces/*}/members:\nmembership\x12\xae\x01\n\x10UpdateMembership\x12\'.google.chat.v1.UpdateMembershipRequest\x1a\x1a.google.chat.v1.Membership\"U\xda\x41\x16membership,update_mask\x82\xd3\xe4\x93\x02\x36\x32(/v1/{membership.name=spaces/*/members/*}:\nmembership\x12\x85\x01\n\x10\x44\x65leteMembership\x12\'.google.chat.v1.DeleteMembershipRequest\x1a\x1a.google.chat.v1.Membership\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f*\x1d/v1/{name=spaces/*/members/*}\x12\xa1\x01\n\x0e\x43reateReaction\x12%.google.chat.v1.CreateReactionRequest\x1a\x18.google.chat.v1.Reaction\"N\xda\x41\x0fparent,reaction\x82\xd3\xe4\x93\x02\x36\"*/v1/{parent=spaces/*/messages/*}/reactions:\x08reaction\x12\x99\x01\n\rListReactions\x12$.google.chat.v1.ListReactionsRequest\x1a%.google.chat.v1.ListReactionsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=spaces/*/messages/*}/reactions\x12\x8a\x01\n\x0e\x44\x65leteReaction\x12%.google.chat.v1.DeleteReactionRequest\x1a\x16.google.protobuf.Empty\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=spaces/*/messages/*/reactions/*}\x12\x91\x01\n\x11\x43reateCustomEmoji\x12(.google.chat.v1.CreateCustomEmojiRequest\x1a\x1b.google.chat.v1.CustomEmoji\"5\xda\x41\x0c\x63ustom_emoji\x82\xd3\xe4\x93\x02 \"\x10/v1/customEmojis:\x0c\x63ustom_emoji\x12~\n\x0eGetCustomEmoji\x12%.google.chat.v1.GetCustomEmojiRequest\x1a\x1b.google.chat.v1.CustomEmoji\"(\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1/{name=customEmojis/*}\x12\x82\x01\n\x10ListCustomEmojis\x12\'.google.chat.v1.ListCustomEmojisRequest\x1a(.google.chat.v1.ListCustomEmojisResponse\"\x1b\xda\x41\x00\x82\xd3\xe4\x93\x02\x12\x12\x10/v1/customEmojis\x12\x7f\n\x11\x44\x65leteCustomEmoji\x12(.google.chat.v1.DeleteCustomEmojiRequest\x1a\x16.google.protobuf.Empty\"(\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1b*\x19/v1/{name=customEmojis/*}\x12\x98\x01\n\x11GetSpaceReadState\x12(.google.chat.v1.GetSpaceReadStateRequest\x1a\x1e.google.chat.v1.SpaceReadState\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=users/*/spaces/*/spaceReadState}\x12\xd9\x01\n\x14UpdateSpaceReadState\x12+.google.chat.v1.UpdateSpaceReadStateRequest\x1a\x1e.google.chat.v1.SpaceReadState\"t\xda\x41\x1cspace_read_state,update_mask\x82\xd3\xe4\x93\x02O2;/v1/{space_read_state.name=users/*/spaces/*/spaceReadState}:\x10space_read_state\x12\xa6\x01\n\x12GetThreadReadState\x12).google.chat.v1.GetThreadReadStateRequest\x1a\x1f.google.chat.v1.ThreadReadState\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=users/*/spaces/*/threads/*/threadReadState}\x12\x87\x01\n\x0fGetAvailability\x12&.google.chat.v1.GetAvailabilityRequest\x1a\x1c.google.chat.v1.Availability\".\xda\x41\x04name\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{name=users/*/availability}\x12\x8a\x01\n\x0cMarkAsActive\x12#.google.chat.v1.MarkAsActiveRequest\x1a\x1c.google.chat.v1.Availability\"7\x82\xd3\xe4\x93\x02\x31\",/v1/{name=users/*/availability}:markAsActive:\x01*\x12\x84\x01\n\nMarkAsAway\x12!.google.chat.v1.MarkAsAwayRequest\x1a\x1c.google.chat.v1.Availability\"5\x82\xd3\xe4\x93\x02/\"*/v1/{name=users/*/availability}:markAsAway:\x01*\x12\x9c\x01\n\x12MarkAsDoNotDisturb\x12).google.chat.v1.MarkAsDoNotDisturbRequest\x1a\x1c.google.chat.v1.Availability\"=\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=users/*/availability}:markAsDoNotDisturb:\x01*\x12\xbc\x01\n\x12UpdateAvailability\x12).google.chat.v1.UpdateAvailabilityRequest\x1a\x1c.google.chat.v1.Availability\"]\xda\x41\x18\x61vailability,update_mask\x82\xd3\xe4\x93\x02<2,/v1/{availability.name=users/*/availability}:\x0c\x61vailability\x12\x83\x01\n\rGetSpaceEvent\x12$.google.chat.v1.GetSpaceEventRequest\x1a\x1a.google.chat.v1.SpaceEvent\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=spaces/*/spaceEvents/*}\x12\x9d\x01\n\x0fListSpaceEvents\x12&.google.chat.v1.ListSpaceEventsRequest\x1a\'.google.chat.v1.ListSpaceEventsResponse\"9\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=spaces/*}/spaceEvents\x12\xc0\x01\n\x1bGetSpaceNotificationSetting\x12\x32.google.chat.v1.GetSpaceNotificationSettingRequest\x1a(.google.chat.v1.SpaceNotificationSetting\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=users/*/spaces/*/spaceNotificationSetting}\x12\xa0\x02\n\x1eUpdateSpaceNotificationSetting\x12\x35.google.chat.v1.UpdateSpaceNotificationSettingRequest\x1a(.google.chat.v1.SpaceNotificationSetting\"\x9c\x01\xda\x41&space_notification_setting,update_mask\x82\xd3\xe4\x93\x02m2O/v1/{space_notification_setting.name=users/*/spaces/*/spaceNotificationSetting}:\x1aspace_notification_setting\x12\x8f\x01\n\rCreateSection\x12$.google.chat.v1.CreateSectionRequest\x1a\x17.google.chat.v1.Section\"?\xda\x41\x0eparent,section\x82\xd3\xe4\x93\x02(\"\x1d/v1/{parent=users/*}/sections:\x07section\x12{\n\rDeleteSection\x12$.google.chat.v1.DeleteSectionRequest\x1a\x16.google.protobuf.Empty\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f*\x1d/v1/{name=users/*/sections/*}\x12\x9c\x01\n\rUpdateSection\x12$.google.chat.v1.UpdateSectionRequest\x1a\x17.google.chat.v1.Section\"L\xda\x41\x13section,update_mask\x82\xd3\xe4\x93\x02\x30\x32%/v1/{section.name=users/*/sections/*}:\x07section\x12\x89\x01\n\x0cListSections\x12#.google.chat.v1.ListSectionsRequest\x1a$.google.chat.v1.ListSectionsResponse\".\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=users/*}/sections\x12\x95\x01\n\x0fPositionSection\x12&.google.chat.v1.PositionSectionRequest\x1a\'.google.chat.v1.PositionSectionResponse\"1\x82\xd3\xe4\x93\x02+\"&/v1/{name=users/*/sections/*}:position:\x01*\x12\x9d\x01\n\x10ListSectionItems\x12\'.google.chat.v1.ListSectionItemsRequest\x1a(.google.chat.v1.ListSectionItemsResponse\"6\xda\x41\x06parent\x82\xd3\xe4\x93\x02\'\x12%/v1/{parent=users/*/sections/*}/items\x12\xaf\x01\n\x0fMoveSectionItem\x12&.google.chat.v1.MoveSectionItemRequest\x1a\'.google.chat.v1.MoveSectionItemResponse\"K\xda\x41\x13name,target_section\x82\xd3\xe4\x93\x02/\"*/v1/{name=users/*/sections/*/items/*}:move:\x01*\x1a\xb7\x0f\xca\x41\x13\x63hat.googleapis.com\xd2\x41\x9d\x0fhttps://www.googleapis.com/auth/chat.admin.delete,https://www.googleapis.com/auth/chat.admin.memberships,https://www.googleapis.com/auth/chat.admin.memberships.readonly,https://www.googleapis.com/auth/chat.admin.spaces,https://www.googleapis.com/auth/chat.admin.spaces.readonly,https://www.googleapis.com/auth/chat.app.delete,https://www.googleapis.com/auth/chat.app.memberships,https://www.googleapis.com/auth/chat.app.memberships.readonly,https://www.googleapis.com/auth/chat.app.messages.readonly,https://www.googleapis.com/auth/chat.app.spaces,https://www.googleapis.com/auth/chat.app.spaces.create,https://www.googleapis.com/auth/chat.app.spaces.readonly,https://www.googleapis.com/auth/chat.bot,https://www.googleapis.com/auth/chat.customemojis,https://www.googleapis.com/auth/chat.customemojis.readonly,https://www.googleapis.com/auth/chat.delete,https://www.googleapis.com/auth/chat.import,https://www.googleapis.com/auth/chat.memberships,https://www.googleapis.com/auth/chat.memberships.app,https://www.googleapis.com/auth/chat.memberships.readonly,https://www.googleapis.com/auth/chat.messages,https://www.googleapis.com/auth/chat.messages.create,https://www.googleapis.com/auth/chat.messages.reactions,https://www.googleapis.com/auth/chat.messages.reactions.create,https://www.googleapis.com/auth/chat.messages.reactions.readonly,https://www.googleapis.com/auth/chat.messages.readonly,https://www.googleapis.com/auth/chat.spaces,https://www.googleapis.com/auth/chat.spaces.create,https://www.googleapis.com/auth/chat.spaces.readonly,https://www.googleapis.com/auth/chat.users.availability,https://www.googleapis.com/auth/chat.users.availability.readonly,https://www.googleapis.com/auth/chat.users.readstate,https://www.googleapis.com/auth/chat.users.readstate.readonly,https://www.googleapis.com/auth/chat.users.sections,https://www.googleapis.com/auth/chat.users.sections.readonly,https://www.googleapis.com/auth/chat.users.spacesettingsB\xa9\x01\n\x12\x63om.google.chat.v1B\x10\x43hatServiceProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xa2\x02\x0b\x44YNAPIProto\xaa\x02\x13Google.Apps.Chat.V1\xca\x02\x13Google\\Apps\\Chat\\V1\xea\x02\x16Google::Apps::Chat::V1b\x06proto3"
|
|
24
|
+
descriptor_data = "\n!google/chat/v1/chat_service.proto\x12\x0egoogle.chat.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/chat/v1/attachment.proto\x1a!google/chat/v1/availability.proto\x1a\x1fgoogle/chat/v1/membership.proto\x1a\x1cgoogle/chat/v1/message.proto\x1a\x1dgoogle/chat/v1/reaction.proto\x1a\x1cgoogle/chat/v1/section.proto\x1a\x1agoogle/chat/v1/space.proto\x1a google/chat/v1/space_event.proto\x1a/google/chat/v1/space_notification_setting.proto\x1a%google/chat/v1/space_read_state.proto\x1a google/chat/v1/space_setup.proto\x1a&google/chat/v1/thread_read_state.proto\x1a\x1bgoogle/protobuf/empty.proto2\xeaH\n\x0b\x43hatService\x12\x9b\x01\n\rCreateMessage\x12$.google.chat.v1.CreateMessageRequest\x1a\x17.google.chat.v1.Message\"K\xda\x41\x19parent,message,message_id\x82\xd3\xe4\x93\x02)\"\x1e/v1/{parent=spaces/*}/messages:\x07message\x12\x8a\x01\n\x0cListMessages\x12#.google.chat.v1.ListMessagesRequest\x1a$.google.chat.v1.ListMessagesResponse\"/\xda\x41\x06parent\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{parent=spaces/*}/messages\x12\x92\x01\n\x0fListMemberships\x12&.google.chat.v1.ListMembershipsRequest\x1a\'.google.chat.v1.ListMembershipsResponse\".\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=spaces/*}/members\x12\x7f\n\rGetMembership\x12$.google.chat.v1.GetMembershipRequest\x1a\x1a.google.chat.v1.Membership\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=spaces/*/members/*}\x12w\n\nGetMessage\x12!.google.chat.v1.GetMessageRequest\x1a\x17.google.chat.v1.Message\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{name=spaces/*/messages/*}\x12\xd1\x01\n\rUpdateMessage\x12$.google.chat.v1.UpdateMessageRequest\x1a\x17.google.chat.v1.Message\"\x80\x01\xda\x41\x13message,update_mask\x82\xd3\xe4\x93\x02\x64\x1a&/v1/{message.name=spaces/*/messages/*}:\x07messageZ12&/v1/{message.name=spaces/*/messages/*}:\x07message\x12|\n\rDeleteMessage\x12$.google.chat.v1.DeleteMessageRequest\x1a\x16.google.protobuf.Empty\"-\xda\x41\x04name\x82\xd3\xe4\x93\x02 *\x1e/v1/{name=spaces/*/messages/*}\x12\xa1\x01\n\x0eSearchMessages\x12%.google.chat.v1.SearchMessagesRequest\x1a&.google.chat.v1.SearchMessagesResponse\"@\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02*\"%/v1/{parent=spaces/*}/messages:search:\x01*\x12\x8e\x01\n\rGetAttachment\x12$.google.chat.v1.GetAttachmentRequest\x1a\x1a.google.chat.v1.Attachment\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=spaces/*/messages/*/attachments/*}\x12\x9a\x01\n\x10UploadAttachment\x12\'.google.chat.v1.UploadAttachmentRequest\x1a(.google.chat.v1.UploadAttachmentResponse\"3\x82\xd3\xe4\x93\x02-\"(/v1/{parent=spaces/*}/attachments:upload:\x01*\x12j\n\nListSpaces\x12!.google.chat.v1.ListSpacesRequest\x1a\".google.chat.v1.ListSpacesResponse\"\x15\xda\x41\x00\x82\xd3\xe4\x93\x02\x0c\x12\n/v1/spaces\x12w\n\x0cSearchSpaces\x12#.google.chat.v1.SearchSpacesRequest\x1a$.google.chat.v1.SearchSpacesResponse\"\x1c\xda\x41\x00\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/spaces:search\x12\x66\n\x08GetSpace\x12\x1f.google.chat.v1.GetSpaceRequest\x1a\x15.google.chat.v1.Space\"\"\xda\x41\x04name\x82\xd3\xe4\x93\x02\x15\x12\x13/v1/{name=spaces/*}\x12k\n\x0b\x43reateSpace\x12\".google.chat.v1.CreateSpaceRequest\x1a\x15.google.chat.v1.Space\"!\xda\x41\x05space\x82\xd3\xe4\x93\x02\x13\"\n/v1/spaces:\x05space\x12\x63\n\nSetUpSpace\x12!.google.chat.v1.SetUpSpaceRequest\x1a\x15.google.chat.v1.Space\"\x1b\x82\xd3\xe4\x93\x02\x15\"\x10/v1/spaces:setup:\x01*\x12\x86\x01\n\x0bUpdateSpace\x12\".google.chat.v1.UpdateSpaceRequest\x1a\x15.google.chat.v1.Space\"<\xda\x41\x11space,update_mask\x82\xd3\xe4\x93\x02\"2\x19/v1/{space.name=spaces/*}:\x05space\x12m\n\x0b\x44\x65leteSpace\x12\".google.chat.v1.DeleteSpaceRequest\x1a\x16.google.protobuf.Empty\"\"\xda\x41\x04name\x82\xd3\xe4\x93\x02\x15*\x13/v1/{name=spaces/*}\x12\x9d\x01\n\x13\x43ompleteImportSpace\x12*.google.chat.v1.CompleteImportSpaceRequest\x1a+.google.chat.v1.CompleteImportSpaceResponse\"-\x82\xd3\xe4\x93\x02\'\"\"/v1/{name=spaces/*}:completeImport:\x01*\x12z\n\x11\x46indDirectMessage\x12(.google.chat.v1.FindDirectMessageRequest\x1a\x15.google.chat.v1.Space\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/spaces:findDirectMessage\x12\x82\x01\n\x0e\x46indGroupChats\x12%.google.chat.v1.FindGroupChatsRequest\x1a&.google.chat.v1.FindGroupChatsResponse\"!\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1/spaces:findGroupChats\x12\x9e\x01\n\x10\x43reateMembership\x12\'.google.chat.v1.CreateMembershipRequest\x1a\x1a.google.chat.v1.Membership\"E\xda\x41\x11parent,membership\x82\xd3\xe4\x93\x02+\"\x1d/v1/{parent=spaces/*}/members:\nmembership\x12\xae\x01\n\x10UpdateMembership\x12\'.google.chat.v1.UpdateMembershipRequest\x1a\x1a.google.chat.v1.Membership\"U\xda\x41\x16membership,update_mask\x82\xd3\xe4\x93\x02\x36\x32(/v1/{membership.name=spaces/*/members/*}:\nmembership\x12\x85\x01\n\x10\x44\x65leteMembership\x12\'.google.chat.v1.DeleteMembershipRequest\x1a\x1a.google.chat.v1.Membership\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f*\x1d/v1/{name=spaces/*/members/*}\x12\xa1\x01\n\x0e\x43reateReaction\x12%.google.chat.v1.CreateReactionRequest\x1a\x18.google.chat.v1.Reaction\"N\xda\x41\x0fparent,reaction\x82\xd3\xe4\x93\x02\x36\"*/v1/{parent=spaces/*/messages/*}/reactions:\x08reaction\x12\x99\x01\n\rListReactions\x12$.google.chat.v1.ListReactionsRequest\x1a%.google.chat.v1.ListReactionsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=spaces/*/messages/*}/reactions\x12\x8a\x01\n\x0e\x44\x65leteReaction\x12%.google.chat.v1.DeleteReactionRequest\x1a\x16.google.protobuf.Empty\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=spaces/*/messages/*/reactions/*}\x12\x91\x01\n\x11\x43reateCustomEmoji\x12(.google.chat.v1.CreateCustomEmojiRequest\x1a\x1b.google.chat.v1.CustomEmoji\"5\xda\x41\x0c\x63ustom_emoji\x82\xd3\xe4\x93\x02 \"\x10/v1/customEmojis:\x0c\x63ustom_emoji\x12~\n\x0eGetCustomEmoji\x12%.google.chat.v1.GetCustomEmojiRequest\x1a\x1b.google.chat.v1.CustomEmoji\"(\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1b\x12\x19/v1/{name=customEmojis/*}\x12\x82\x01\n\x10ListCustomEmojis\x12\'.google.chat.v1.ListCustomEmojisRequest\x1a(.google.chat.v1.ListCustomEmojisResponse\"\x1b\xda\x41\x00\x82\xd3\xe4\x93\x02\x12\x12\x10/v1/customEmojis\x12\x7f\n\x11\x44\x65leteCustomEmoji\x12(.google.chat.v1.DeleteCustomEmojiRequest\x1a\x16.google.protobuf.Empty\"(\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1b*\x19/v1/{name=customEmojis/*}\x12\x98\x01\n\x11GetSpaceReadState\x12(.google.chat.v1.GetSpaceReadStateRequest\x1a\x1e.google.chat.v1.SpaceReadState\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=users/*/spaces/*/spaceReadState}\x12\xd9\x01\n\x14UpdateSpaceReadState\x12+.google.chat.v1.UpdateSpaceReadStateRequest\x1a\x1e.google.chat.v1.SpaceReadState\"t\xda\x41\x1cspace_read_state,update_mask\x82\xd3\xe4\x93\x02O2;/v1/{space_read_state.name=users/*/spaces/*/spaceReadState}:\x10space_read_state\x12\xa6\x01\n\x12GetThreadReadState\x12).google.chat.v1.GetThreadReadStateRequest\x1a\x1f.google.chat.v1.ThreadReadState\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=users/*/spaces/*/threads/*/threadReadState}\x12\x87\x01\n\x0fGetAvailability\x12&.google.chat.v1.GetAvailabilityRequest\x1a\x1c.google.chat.v1.Availability\".\xda\x41\x04name\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{name=users/*/availability}\x12\x8a\x01\n\x0cMarkAsActive\x12#.google.chat.v1.MarkAsActiveRequest\x1a\x1c.google.chat.v1.Availability\"7\x82\xd3\xe4\x93\x02\x31\",/v1/{name=users/*/availability}:markAsActive:\x01*\x12\x84\x01\n\nMarkAsAway\x12!.google.chat.v1.MarkAsAwayRequest\x1a\x1c.google.chat.v1.Availability\"5\x82\xd3\xe4\x93\x02/\"*/v1/{name=users/*/availability}:markAsAway:\x01*\x12\x9c\x01\n\x12MarkAsDoNotDisturb\x12).google.chat.v1.MarkAsDoNotDisturbRequest\x1a\x1c.google.chat.v1.Availability\"=\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=users/*/availability}:markAsDoNotDisturb:\x01*\x12\xbc\x01\n\x12UpdateAvailability\x12).google.chat.v1.UpdateAvailabilityRequest\x1a\x1c.google.chat.v1.Availability\"]\xda\x41\x18\x61vailability,update_mask\x82\xd3\xe4\x93\x02<2,/v1/{availability.name=users/*/availability}:\x0c\x61vailability\x12\x83\x01\n\rGetSpaceEvent\x12$.google.chat.v1.GetSpaceEventRequest\x1a\x1a.google.chat.v1.SpaceEvent\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=spaces/*/spaceEvents/*}\x12\x9d\x01\n\x0fListSpaceEvents\x12&.google.chat.v1.ListSpaceEventsRequest\x1a\'.google.chat.v1.ListSpaceEventsResponse\"9\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=spaces/*}/spaceEvents\x12\xc0\x01\n\x1bGetSpaceNotificationSetting\x12\x32.google.chat.v1.GetSpaceNotificationSettingRequest\x1a(.google.chat.v1.SpaceNotificationSetting\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=users/*/spaces/*/spaceNotificationSetting}\x12\xa0\x02\n\x1eUpdateSpaceNotificationSetting\x12\x35.google.chat.v1.UpdateSpaceNotificationSettingRequest\x1a(.google.chat.v1.SpaceNotificationSetting\"\x9c\x01\xda\x41&space_notification_setting,update_mask\x82\xd3\xe4\x93\x02m2O/v1/{space_notification_setting.name=users/*/spaces/*/spaceNotificationSetting}:\x1aspace_notification_setting\x12\x8f\x01\n\rCreateSection\x12$.google.chat.v1.CreateSectionRequest\x1a\x17.google.chat.v1.Section\"?\xda\x41\x0eparent,section\x82\xd3\xe4\x93\x02(\"\x1d/v1/{parent=users/*}/sections:\x07section\x12{\n\rDeleteSection\x12$.google.chat.v1.DeleteSectionRequest\x1a\x16.google.protobuf.Empty\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f*\x1d/v1/{name=users/*/sections/*}\x12\x9c\x01\n\rUpdateSection\x12$.google.chat.v1.UpdateSectionRequest\x1a\x17.google.chat.v1.Section\"L\xda\x41\x13section,update_mask\x82\xd3\xe4\x93\x02\x30\x32%/v1/{section.name=users/*/sections/*}:\x07section\x12\x89\x01\n\x0cListSections\x12#.google.chat.v1.ListSectionsRequest\x1a$.google.chat.v1.ListSectionsResponse\".\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{parent=users/*}/sections\x12\x95\x01\n\x0fPositionSection\x12&.google.chat.v1.PositionSectionRequest\x1a\'.google.chat.v1.PositionSectionResponse\"1\x82\xd3\xe4\x93\x02+\"&/v1/{name=users/*/sections/*}:position:\x01*\x12\x9d\x01\n\x10ListSectionItems\x12\'.google.chat.v1.ListSectionItemsRequest\x1a(.google.chat.v1.ListSectionItemsResponse\"6\xda\x41\x06parent\x82\xd3\xe4\x93\x02\'\x12%/v1/{parent=users/*/sections/*}/items\x12\xaf\x01\n\x0fMoveSectionItem\x12&.google.chat.v1.MoveSectionItemRequest\x1a\'.google.chat.v1.MoveSectionItemResponse\"K\xda\x41\x13name,target_section\x82\xd3\xe4\x93\x02/\"*/v1/{name=users/*/sections/*/items/*}:move:\x01*\x1a\xb7\x0f\xca\x41\x13\x63hat.googleapis.com\xd2\x41\x9d\x0fhttps://www.googleapis.com/auth/chat.admin.delete,https://www.googleapis.com/auth/chat.admin.memberships,https://www.googleapis.com/auth/chat.admin.memberships.readonly,https://www.googleapis.com/auth/chat.admin.spaces,https://www.googleapis.com/auth/chat.admin.spaces.readonly,https://www.googleapis.com/auth/chat.app.delete,https://www.googleapis.com/auth/chat.app.memberships,https://www.googleapis.com/auth/chat.app.memberships.readonly,https://www.googleapis.com/auth/chat.app.messages.readonly,https://www.googleapis.com/auth/chat.app.spaces,https://www.googleapis.com/auth/chat.app.spaces.create,https://www.googleapis.com/auth/chat.app.spaces.readonly,https://www.googleapis.com/auth/chat.bot,https://www.googleapis.com/auth/chat.customemojis,https://www.googleapis.com/auth/chat.customemojis.readonly,https://www.googleapis.com/auth/chat.delete,https://www.googleapis.com/auth/chat.import,https://www.googleapis.com/auth/chat.memberships,https://www.googleapis.com/auth/chat.memberships.app,https://www.googleapis.com/auth/chat.memberships.readonly,https://www.googleapis.com/auth/chat.messages,https://www.googleapis.com/auth/chat.messages.create,https://www.googleapis.com/auth/chat.messages.reactions,https://www.googleapis.com/auth/chat.messages.reactions.create,https://www.googleapis.com/auth/chat.messages.reactions.readonly,https://www.googleapis.com/auth/chat.messages.readonly,https://www.googleapis.com/auth/chat.spaces,https://www.googleapis.com/auth/chat.spaces.create,https://www.googleapis.com/auth/chat.spaces.readonly,https://www.googleapis.com/auth/chat.users.availability,https://www.googleapis.com/auth/chat.users.availability.readonly,https://www.googleapis.com/auth/chat.users.readstate,https://www.googleapis.com/auth/chat.users.readstate.readonly,https://www.googleapis.com/auth/chat.users.sections,https://www.googleapis.com/auth/chat.users.sections.readonly,https://www.googleapis.com/auth/chat.users.spacesettingsB\xa9\x01\n\x12\x63om.google.chat.v1B\x10\x43hatServiceProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xa2\x02\x0b\x44YNAPIProto\xaa\x02\x13Google.Apps.Chat.V1\xca\x02\x13Google\\Apps\\Chat\\V1\xea\x02\x16Google::Apps::Chat::V1b\x06proto3"
|
|
25
25
|
|
|
26
26
|
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
27
27
|
pool.add_serialized_file(descriptor_data)
|
|
@@ -244,6 +244,34 @@ module Google
|
|
|
244
244
|
# When using app authentication, requests can only delete messages
|
|
245
245
|
# created by the calling Chat app.
|
|
246
246
|
rpc :DeleteMessage, ::Google::Apps::Chat::V1::DeleteMessageRequest, ::Google::Protobuf::Empty
|
|
247
|
+
# Searches for messages in Google Chat that the calling user has access to.
|
|
248
|
+
# Returns a list of messages matching the search criteria.
|
|
249
|
+
#
|
|
250
|
+
# To search across all spaces the user has access to, set `parent` to
|
|
251
|
+
# `spaces/-`. Using any other value for `parent` results in an
|
|
252
|
+
# `INVALID_ARGUMENT` error. The returned messages have their `name` field
|
|
253
|
+
# populated with the full resource name, which includes the specific `space`
|
|
254
|
+
# in which the message resides.
|
|
255
|
+
#
|
|
256
|
+
# This API doesn't return all message types. The types of messages listed
|
|
257
|
+
# below aren't included in the response. Use
|
|
258
|
+
# [ListMessages][google.chat.v1.ChatService.ListMessages] to list all
|
|
259
|
+
# messages.
|
|
260
|
+
#
|
|
261
|
+
# - Private Messages that are visible to the authenticated user.
|
|
262
|
+
# - Messages posted by Chat apps in spaces or group chats.
|
|
263
|
+
# - Messages in a Chat app DM.
|
|
264
|
+
# - Messages from blocked users.
|
|
265
|
+
# - Messages in spaces that the caller has muted.
|
|
266
|
+
#
|
|
267
|
+
# Requires [user
|
|
268
|
+
# authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
269
|
+
# with one of the following [authorization
|
|
270
|
+
# scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
271
|
+
#
|
|
272
|
+
# - `https://www.googleapis.com/auth/chat.messages.readonly`
|
|
273
|
+
# - `https://www.googleapis.com/auth/chat.messages`
|
|
274
|
+
rpc :SearchMessages, ::Google::Apps::Chat::V1::SearchMessagesRequest, ::Google::Apps::Chat::V1::SearchMessagesResponse
|
|
247
275
|
# Gets the metadata of a message attachment. The attachment data is fetched
|
|
248
276
|
# using the [media
|
|
249
277
|
# API](https://developers.google.com/workspace/chat/api/reference/rest/v1/media/download).
|
|
@@ -16,12 +16,13 @@ require 'google/chat/v1/matched_url_pb'
|
|
|
16
16
|
require 'google/chat/v1/reaction_pb'
|
|
17
17
|
require 'google/chat/v1/slash_command_pb'
|
|
18
18
|
require 'google/chat/v1/space_pb'
|
|
19
|
+
require 'google/chat/v1/space_notification_setting_pb'
|
|
19
20
|
require 'google/chat/v1/user_pb'
|
|
20
21
|
require 'google/protobuf/field_mask_pb'
|
|
21
22
|
require 'google/protobuf/timestamp_pb'
|
|
22
23
|
|
|
23
24
|
|
|
24
|
-
descriptor_data = "\n\x1cgoogle/chat/v1/message.proto\x12\x0egoogle.chat.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/apps/card/v1/card.proto\x1a\"google/chat/v1/action_status.proto\x1a\x1fgoogle/chat/v1/annotation.proto\x1a\x1fgoogle/chat/v1/attachment.proto\x1a%google/chat/v1/contextual_addon.proto\x1a&google/chat/v1/deletion_metadata.proto\x1a google/chat/v1/matched_url.proto\x1a\x1dgoogle/chat/v1/reaction.proto\x1a\"google/chat/v1/slash_command.proto\x1a\x1agoogle/chat/v1/space.proto\x1a\x19google/chat/v1/user.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe9\n\n\x07Message\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12)\n\x06sender\x18\x02 \x01(\x0b\x32\x14.google.chat.v1.UserB\x03\xe0\x41\x03\x12\x37\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xe0\x41\x05\xe0\x41\x01\x12\x39\n\x10last_update_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x1a \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04text\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0e\x66ormatted_text\x18+ \x01(\tB\x03\xe0\x41\x03\x12=\n\x05\x63\x61rds\x18\x05 \x03(\x0b\x32*.google.chat.v1.ContextualAddOnMarkup.CardB\x02\x18\x01\x12\x31\n\x08\x63\x61rds_v2\x18\x16 \x03(\x0b\x32\x1a.google.chat.v1.CardWithIdB\x03\xe0\x41\x01\x12\x34\n\x0b\x61nnotations\x18\n \x03(\x0b\x32\x1a.google.chat.v1.AnnotationB\x03\xe0\x41\x03\x12&\n\x06thread\x18\x0b \x01(\x0b\x32\x16.google.chat.v1.Thread\x12)\n\x05space\x18\x0c \x01(\x0b\x32\x15.google.chat.v1.SpaceB\x03\xe0\x41\x03\x12\x1a\n\rfallback_text\x18\r \x01(\tB\x03\xe0\x41\x01\x12<\n\x0f\x61\x63tion_response\x18\x0e \x01(\x0b\x32\x1e.google.chat.v1.ActionResponseB\x03\xe0\x41\x04\x12\x1a\n\rargument_text\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12\x38\n\rslash_command\x18\x11 \x01(\x0b\x32\x1c.google.chat.v1.SlashCommandB\x03\xe0\x41\x03\x12\x33\n\nattachment\x18\x12 \x03(\x0b\x32\x1a.google.chat.v1.AttachmentB\x03\xe0\x41\x01\x12\x34\n\x0bmatched_url\x18\x14 \x01(\x0b\x32\x1a.google.chat.v1.MatchedUrlB\x03\xe0\x41\x03\x12\x19\n\x0cthread_reply\x18\x19 \x01(\x08\x42\x03\xe0\x41\x03\x12\x13\n\x06silent\x18. \x01(\x08\x42\x03\xe0\x41\x03\x12\'\n\x1a\x63lient_assigned_message_id\x18 \x01(\tB\x03\xe0\x41\x01\x12K\n\x18\x65moji_reaction_summaries\x18! \x03(\x0b\x32$.google.chat.v1.EmojiReactionSummaryB\x03\xe0\x41\x03\x12<\n\x16private_message_viewer\x18$ \x01(\x0b\x32\x14.google.chat.v1.UserB\x06\xe0\x41\x05\xe0\x41\x01\x12@\n\x11\x64\x65letion_metadata\x18& \x01(\x0b\x32 .google.chat.v1.DeletionMetadataB\x03\xe0\x41\x03\x12K\n\x17quoted_message_metadata\x18\' \x01(\x0b\x32%.google.chat.v1.QuotedMessageMetadataB\x03\xe0\x41\x01\x12\x37\n\rattached_gifs\x18* \x03(\x0b\x32\x1b.google.chat.v1.AttachedGifB\x03\xe0\x41\x03\x12?\n\x11\x61\x63\x63\x65ssory_widgets\x18, \x03(\x0b\x32\x1f.google.chat.v1.AccessoryWidgetB\x03\xe0\x41\x01:C\xea\x41@\n\x1b\x63hat.googleapis.com/Message\x12!spaces/{space}/messages/{message}\"\x1f\n\x0b\x41ttachedGif\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xa5\x04\n\x15QuotedMessageMetadata\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x63hat.googleapis.com/Message\x12\x39\n\x10last_update_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12H\n\nquote_type\x18\x04 \x01(\x0e\x32/.google.chat.v1.QuotedMessageMetadata.QuoteTypeB\x03\xe0\x41\x01\x12K\n\x17quoted_message_snapshot\x18\x05 \x01(\x0b\x32%.google.chat.v1.QuotedMessageSnapshotB\x03\xe0\x41\x03\x12\x42\n\x12\x66orwarded_metadata\x18\x06 \x01(\x0b\x32!.google.chat.v1.ForwardedMetadataB\x03\xe0\x41\x03\"?\n\tQuoteType\x12\x1a\n\x16QUOTE_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05REPLY\x10\x01\x12\x0b\n\x07\x46ORWARD\x10\x02:\x81\x01\xea\x41~\n)chat.googleapis.com/QuotedMessageMetadata\x12Qspaces/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata}\"\xc8\x01\n\x15QuotedMessageSnapshot\x12\x13\n\x06sender\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04text\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0e\x66ormatted_text\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32\x1a.google.chat.v1.AnnotationB\x03\xe0\x41\x03\x12\x34\n\x0b\x61ttachments\x18\x05 \x03(\x0b\x32\x1a.google.chat.v1.AttachmentB\x03\xe0\x41\x03\"f\n\x11\x46orwardedMetadata\x12\x30\n\x05space\x18\x01 \x01(\tB!\xe0\x41\x03\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\x12\x1f\n\x12space_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\"v\n\x06Thread\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\nthread_key\x18\x03 \x01(\tB\x03\xe0\x41\x01:@\xea\x41=\n\x1a\x63hat.googleapis.com/Thread\x12\x1fspaces/{space}/threads/{thread}\"\xd2\x04\n\x0e\x41\x63tionResponse\x12>\n\x04type\x18\x01 \x01(\x0e\x32+.google.chat.v1.ActionResponse.ResponseTypeB\x03\xe0\x41\x04\x12\x10\n\x03url\x18\x02 \x01(\tB\x03\xe0\x41\x04\x12\x38\n\rdialog_action\x18\x03 \x01(\x0b\x32\x1c.google.chat.v1.DialogActionB\x03\xe0\x41\x04\x12I\n\x0eupdated_widget\x18\x04 \x01(\x0b\x32,.google.chat.v1.ActionResponse.UpdatedWidgetB\x03\xe0\x41\x04\x1aR\n\x0eSelectionItems\x12@\n\x05items\x18\x01 \x03(\x0b\x32\x31.google.apps.card.v1.SelectionInput.SelectionItem\x1aw\n\rUpdatedWidget\x12\x44\n\x0bsuggestions\x18\x01 \x01(\x0b\x32-.google.chat.v1.ActionResponse.SelectionItemsH\x00\x12\x0e\n\x06widget\x18\x02 \x01(\tB\x10\n\x0eupdated_widget\"\x9b\x01\n\x0cResponseType\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_MESSAGE\x10\x01\x12\x12\n\x0eUPDATE_MESSAGE\x10\x02\x12\x1d\n\x19UPDATE_USER_MESSAGE_CARDS\x10\x06\x12\x12\n\x0eREQUEST_CONFIG\x10\x03\x12\n\n\x06\x44IALOG\x10\x04\x12\x11\n\rUPDATE_WIDGET\x10\x07\"S\n\x0f\x41\x63\x63\x65ssoryWidget\x12\x36\n\x0b\x62utton_list\x18\x01 \x01(\x0b\x32\x1f.google.apps.card.v1.ButtonListH\x00\x42\x08\n\x06\x61\x63tion\"F\n\x11GetMessageRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x63hat.googleapis.com/Message\"]\n\x14\x44\x65leteMessageRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x63hat.googleapis.com/Message\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x97\x01\n\x14UpdateMessageRequest\x12-\n\x07message\x18\x01 \x01(\x0b\x32\x17.google.chat.v1.MessageB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x88\x04\n\x14\x43reateMessageRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1b\x63hat.googleapis.com/Message\x12-\n\x07message\x18\x04 \x01(\x0b\x32\x17.google.chat.v1.MessageB\x03\xe0\x41\x02\x12\x19\n\nthread_key\x18\x06 \x01(\tB\x05\x18\x01\xe0\x41\x01\x12\x17\n\nrequest_id\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12Z\n\x14message_reply_option\x18\x08 \x01(\x0e\x32\x37.google.chat.v1.CreateMessageRequest.MessageReplyOptionB\x03\xe0\x41\x01\x12\x17\n\nmessage_id\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x62\n#create_message_notification_options\x18\n \x01(\x0b\x32\x30.google.chat.v1.CreateMessageNotificationOptionsB\x03\xe0\x41\x01\"\x7f\n\x12MessageReplyOption\x12$\n MESSAGE_REPLY_OPTION_UNSPECIFIED\x10\x00\x12(\n$REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD\x10\x01\x12\x19\n\x15REPLY_MESSAGE_OR_FAIL\x10\x02\"\xf2\x01\n CreateMessageNotificationOptions\x12\\\n\x11notification_type\x18\x01 \x01(\x0e\x32\x41.google.chat.v1.CreateMessageNotificationOptions.NotificationType\"p\n\x10NotificationType\x12\x1a\n\x16NOTIFICATION_TYPE_NONE\x10\x00\x12\"\n\x1eNOTIFICATION_TYPE_FORCE_NOTIFY\x10\x02\x12\x1c\n\x18NOTIFICATION_TYPE_SILENT\x10\x03\"\xc2\x01\n\x13ListMessagesRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1b\x63hat.googleapis.com/Message\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cshow_deleted\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"Z\n\x14ListMessagesResponse\x12)\n\x08messages\x18\x01 \x03(\x0b\x32\x17.google.chat.v1.Message\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x81\x01\n\x0c\x44ialogAction\x12-\n\x06\x64ialog\x18\x01 \x01(\x0b\x32\x16.google.chat.v1.DialogB\x03\xe0\x41\x04H\x00\x12\x38\n\raction_status\x18\x02 \x01(\x0b\x32\x1c.google.chat.v1.ActionStatusB\x03\xe0\x41\x04\x42\x08\n\x06\x61\x63tion\"6\n\x06\x44ialog\x12,\n\x04\x62ody\x18\x01 \x01(\x0b\x32\x19.google.apps.card.v1.CardB\x03\xe0\x41\x04\"F\n\nCardWithId\x12\x0f\n\x07\x63\x61rd_id\x18\x01 \x01(\t\x12\'\n\x04\x63\x61rd\x18\x02 \x01(\x0b\x32\x19.google.apps.card.v1.CardB\xa5\x01\n\x12\x63om.google.chat.v1B\x0cMessageProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xa2\x02\x0b\x44YNAPIProto\xaa\x02\x13Google.Apps.Chat.V1\xca\x02\x13Google\\Apps\\Chat\\V1\xea\x02\x16Google::Apps::Chat::V1b\x06proto3"
|
|
25
|
+
descriptor_data = "\n\x1cgoogle/chat/v1/message.proto\x12\x0egoogle.chat.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/apps/card/v1/card.proto\x1a\"google/chat/v1/action_status.proto\x1a\x1fgoogle/chat/v1/annotation.proto\x1a\x1fgoogle/chat/v1/attachment.proto\x1a%google/chat/v1/contextual_addon.proto\x1a&google/chat/v1/deletion_metadata.proto\x1a google/chat/v1/matched_url.proto\x1a\x1dgoogle/chat/v1/reaction.proto\x1a\"google/chat/v1/slash_command.proto\x1a\x1agoogle/chat/v1/space.proto\x1a/google/chat/v1/space_notification_setting.proto\x1a\x19google/chat/v1/user.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe9\n\n\x07Message\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12)\n\x06sender\x18\x02 \x01(\x0b\x32\x14.google.chat.v1.UserB\x03\xe0\x41\x03\x12\x37\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\xe0\x41\x05\xe0\x41\x01\x12\x39\n\x10last_update_time\x18\x17 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x1a \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04text\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0e\x66ormatted_text\x18+ \x01(\tB\x03\xe0\x41\x03\x12=\n\x05\x63\x61rds\x18\x05 \x03(\x0b\x32*.google.chat.v1.ContextualAddOnMarkup.CardB\x02\x18\x01\x12\x31\n\x08\x63\x61rds_v2\x18\x16 \x03(\x0b\x32\x1a.google.chat.v1.CardWithIdB\x03\xe0\x41\x01\x12\x34\n\x0b\x61nnotations\x18\n \x03(\x0b\x32\x1a.google.chat.v1.AnnotationB\x03\xe0\x41\x03\x12&\n\x06thread\x18\x0b \x01(\x0b\x32\x16.google.chat.v1.Thread\x12)\n\x05space\x18\x0c \x01(\x0b\x32\x15.google.chat.v1.SpaceB\x03\xe0\x41\x03\x12\x1a\n\rfallback_text\x18\r \x01(\tB\x03\xe0\x41\x01\x12<\n\x0f\x61\x63tion_response\x18\x0e \x01(\x0b\x32\x1e.google.chat.v1.ActionResponseB\x03\xe0\x41\x04\x12\x1a\n\rargument_text\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12\x38\n\rslash_command\x18\x11 \x01(\x0b\x32\x1c.google.chat.v1.SlashCommandB\x03\xe0\x41\x03\x12\x33\n\nattachment\x18\x12 \x03(\x0b\x32\x1a.google.chat.v1.AttachmentB\x03\xe0\x41\x01\x12\x34\n\x0bmatched_url\x18\x14 \x01(\x0b\x32\x1a.google.chat.v1.MatchedUrlB\x03\xe0\x41\x03\x12\x19\n\x0cthread_reply\x18\x19 \x01(\x08\x42\x03\xe0\x41\x03\x12\x13\n\x06silent\x18. \x01(\x08\x42\x03\xe0\x41\x03\x12\'\n\x1a\x63lient_assigned_message_id\x18 \x01(\tB\x03\xe0\x41\x01\x12K\n\x18\x65moji_reaction_summaries\x18! \x03(\x0b\x32$.google.chat.v1.EmojiReactionSummaryB\x03\xe0\x41\x03\x12<\n\x16private_message_viewer\x18$ \x01(\x0b\x32\x14.google.chat.v1.UserB\x06\xe0\x41\x05\xe0\x41\x01\x12@\n\x11\x64\x65letion_metadata\x18& \x01(\x0b\x32 .google.chat.v1.DeletionMetadataB\x03\xe0\x41\x03\x12K\n\x17quoted_message_metadata\x18\' \x01(\x0b\x32%.google.chat.v1.QuotedMessageMetadataB\x03\xe0\x41\x01\x12\x37\n\rattached_gifs\x18* \x03(\x0b\x32\x1b.google.chat.v1.AttachedGifB\x03\xe0\x41\x03\x12?\n\x11\x61\x63\x63\x65ssory_widgets\x18, \x03(\x0b\x32\x1f.google.chat.v1.AccessoryWidgetB\x03\xe0\x41\x01:C\xea\x41@\n\x1b\x63hat.googleapis.com/Message\x12!spaces/{space}/messages/{message}\"\x1f\n\x0b\x41ttachedGif\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xa5\x04\n\x15QuotedMessageMetadata\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x63hat.googleapis.com/Message\x12\x39\n\x10last_update_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12H\n\nquote_type\x18\x04 \x01(\x0e\x32/.google.chat.v1.QuotedMessageMetadata.QuoteTypeB\x03\xe0\x41\x01\x12K\n\x17quoted_message_snapshot\x18\x05 \x01(\x0b\x32%.google.chat.v1.QuotedMessageSnapshotB\x03\xe0\x41\x03\x12\x42\n\x12\x66orwarded_metadata\x18\x06 \x01(\x0b\x32!.google.chat.v1.ForwardedMetadataB\x03\xe0\x41\x03\"?\n\tQuoteType\x12\x1a\n\x16QUOTE_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05REPLY\x10\x01\x12\x0b\n\x07\x46ORWARD\x10\x02:\x81\x01\xea\x41~\n)chat.googleapis.com/QuotedMessageMetadata\x12Qspaces/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata}\"\xc8\x01\n\x15QuotedMessageSnapshot\x12\x13\n\x06sender\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04text\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0e\x66ormatted_text\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32\x1a.google.chat.v1.AnnotationB\x03\xe0\x41\x03\x12\x34\n\x0b\x61ttachments\x18\x05 \x03(\x0b\x32\x1a.google.chat.v1.AttachmentB\x03\xe0\x41\x03\"f\n\x11\x46orwardedMetadata\x12\x30\n\x05space\x18\x01 \x01(\tB!\xe0\x41\x03\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\x12\x1f\n\x12space_display_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\"v\n\x06Thread\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x17\n\nthread_key\x18\x03 \x01(\tB\x03\xe0\x41\x01:@\xea\x41=\n\x1a\x63hat.googleapis.com/Thread\x12\x1fspaces/{space}/threads/{thread}\"\xd2\x04\n\x0e\x41\x63tionResponse\x12>\n\x04type\x18\x01 \x01(\x0e\x32+.google.chat.v1.ActionResponse.ResponseTypeB\x03\xe0\x41\x04\x12\x10\n\x03url\x18\x02 \x01(\tB\x03\xe0\x41\x04\x12\x38\n\rdialog_action\x18\x03 \x01(\x0b\x32\x1c.google.chat.v1.DialogActionB\x03\xe0\x41\x04\x12I\n\x0eupdated_widget\x18\x04 \x01(\x0b\x32,.google.chat.v1.ActionResponse.UpdatedWidgetB\x03\xe0\x41\x04\x1aR\n\x0eSelectionItems\x12@\n\x05items\x18\x01 \x03(\x0b\x32\x31.google.apps.card.v1.SelectionInput.SelectionItem\x1aw\n\rUpdatedWidget\x12\x44\n\x0bsuggestions\x18\x01 \x01(\x0b\x32-.google.chat.v1.ActionResponse.SelectionItemsH\x00\x12\x0e\n\x06widget\x18\x02 \x01(\tB\x10\n\x0eupdated_widget\"\x9b\x01\n\x0cResponseType\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNEW_MESSAGE\x10\x01\x12\x12\n\x0eUPDATE_MESSAGE\x10\x02\x12\x1d\n\x19UPDATE_USER_MESSAGE_CARDS\x10\x06\x12\x12\n\x0eREQUEST_CONFIG\x10\x03\x12\n\n\x06\x44IALOG\x10\x04\x12\x11\n\rUPDATE_WIDGET\x10\x07\"S\n\x0f\x41\x63\x63\x65ssoryWidget\x12\x36\n\x0b\x62utton_list\x18\x01 \x01(\x0b\x32\x1f.google.apps.card.v1.ButtonListH\x00\x42\x08\n\x06\x61\x63tion\"F\n\x11GetMessageRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x63hat.googleapis.com/Message\"]\n\x14\x44\x65leteMessageRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1b\x63hat.googleapis.com/Message\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x97\x01\n\x14UpdateMessageRequest\x12-\n\x07message\x18\x01 \x01(\x0b\x32\x17.google.chat.v1.MessageB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x88\x04\n\x14\x43reateMessageRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1b\x63hat.googleapis.com/Message\x12-\n\x07message\x18\x04 \x01(\x0b\x32\x17.google.chat.v1.MessageB\x03\xe0\x41\x02\x12\x19\n\nthread_key\x18\x06 \x01(\tB\x05\x18\x01\xe0\x41\x01\x12\x17\n\nrequest_id\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12Z\n\x14message_reply_option\x18\x08 \x01(\x0e\x32\x37.google.chat.v1.CreateMessageRequest.MessageReplyOptionB\x03\xe0\x41\x01\x12\x17\n\nmessage_id\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x62\n#create_message_notification_options\x18\n \x01(\x0b\x32\x30.google.chat.v1.CreateMessageNotificationOptionsB\x03\xe0\x41\x01\"\x7f\n\x12MessageReplyOption\x12$\n MESSAGE_REPLY_OPTION_UNSPECIFIED\x10\x00\x12(\n$REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD\x10\x01\x12\x19\n\x15REPLY_MESSAGE_OR_FAIL\x10\x02\"\xf2\x01\n CreateMessageNotificationOptions\x12\\\n\x11notification_type\x18\x01 \x01(\x0e\x32\x41.google.chat.v1.CreateMessageNotificationOptions.NotificationType\"p\n\x10NotificationType\x12\x1a\n\x16NOTIFICATION_TYPE_NONE\x10\x00\x12\"\n\x1eNOTIFICATION_TYPE_FORCE_NOTIFY\x10\x02\x12\x1c\n\x18NOTIFICATION_TYPE_SILENT\x10\x03\"\xc2\x01\n\x13ListMessagesRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1b\x63hat.googleapis.com/Message\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cshow_deleted\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"Z\n\x14ListMessagesResponse\x12)\n\x08messages\x18\x01 \x03(\x0b\x32\x17.google.chat.v1.Message\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x81\x01\n\x0c\x44ialogAction\x12-\n\x06\x64ialog\x18\x01 \x01(\x0b\x32\x16.google.chat.v1.DialogB\x03\xe0\x41\x04H\x00\x12\x38\n\raction_status\x18\x02 \x01(\x0b\x32\x1c.google.chat.v1.ActionStatusB\x03\xe0\x41\x04\x42\x08\n\x06\x61\x63tion\"6\n\x06\x44ialog\x12,\n\x04\x62ody\x18\x01 \x01(\x0b\x32\x19.google.apps.card.v1.CardB\x03\xe0\x41\x04\"F\n\nCardWithId\x12\x0f\n\x07\x63\x61rd_id\x18\x01 \x01(\t\x12\'\n\x04\x63\x61rd\x18\x02 \x01(\x0b\x32\x19.google.apps.card.v1.Card\"\xef\x02\n\x15SearchMessagesRequest\x12\x31\n\x06parent\x18\x01 \x01(\tB!\xe0\x41\x02\xfa\x41\x1b\n\x19\x63hat.googleapis.com/Space\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12K\n\x04view\x18\x07 \x01(\x0e\x32\x38.google.chat.v1.SearchMessagesRequest.SearchMessagesViewB\x03\xe0\x41\x01\"y\n\x12SearchMessagesView\x12$\n SEARCH_MESSAGES_VIEW_UNSPECIFIED\x10\x00\x12\x1e\n\x1aSEARCH_MESSAGES_VIEW_BASIC\x10\x01\x12\x1d\n\x19SEARCH_MESSAGES_VIEW_FULL\x10\x02\"g\n\x16SearchMessagesResponse\x12\x34\n\x07results\x18\x01 \x03(\x0b\x32#.google.chat.v1.SearchMessageResult\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xad\x01\n\x13SearchMessageResult\x12(\n\x07message\x18\x01 \x01(\x0b\x32\x17.google.chat.v1.Message\x12\x11\n\x04read\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12P\n\x12space_mute_setting\x18\x04 \x01(\x0e\x32\x34.google.chat.v1.SpaceNotificationSetting.MuteSettingB\x07\n\x05_readB\xa5\x01\n\x12\x63om.google.chat.v1B\x0cMessageProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xa2\x02\x0b\x44YNAPIProto\xaa\x02\x13Google.Apps.Chat.V1\xca\x02\x13Google\\Apps\\Chat\\V1\xea\x02\x16Google::Apps::Chat::V1b\x06proto3"
|
|
25
26
|
|
|
26
27
|
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
27
28
|
pool.add_serialized_file(descriptor_data)
|
|
@@ -54,6 +55,10 @@ module Google
|
|
|
54
55
|
DialogAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.DialogAction").msgclass
|
|
55
56
|
Dialog = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.Dialog").msgclass
|
|
56
57
|
CardWithId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.CardWithId").msgclass
|
|
58
|
+
SearchMessagesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.SearchMessagesRequest").msgclass
|
|
59
|
+
SearchMessagesRequest::SearchMessagesView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.SearchMessagesRequest.SearchMessagesView").enummodule
|
|
60
|
+
SearchMessagesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.SearchMessagesResponse").msgclass
|
|
61
|
+
SearchMessageResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.chat.v1.SearchMessageResult").msgclass
|
|
57
62
|
end
|
|
58
63
|
end
|
|
59
64
|
end
|
|
@@ -83,8 +83,8 @@ module Google
|
|
|
83
83
|
#
|
|
84
84
|
# * [Markup
|
|
85
85
|
# syntax](https://developers.google.com/workspace/chat/format-messages)
|
|
86
|
-
# for bold, italic, strikethrough, monospace, monospace block,
|
|
87
|
-
# list.
|
|
86
|
+
# for bold, italic, strikethrough, monospace, monospace block, bulleted
|
|
87
|
+
# list, and block quote.
|
|
88
88
|
#
|
|
89
89
|
# * [User
|
|
90
90
|
# mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention)
|
|
@@ -161,8 +161,8 @@ module Google
|
|
|
161
161
|
# Optional. User-uploaded attachment.
|
|
162
162
|
# @!attribute [r] matched_url
|
|
163
163
|
# @return [::Google::Apps::Chat::V1::MatchedUrl]
|
|
164
|
-
# Output only. A URL in `
|
|
165
|
-
# pattern. For more information, see [Preview
|
|
164
|
+
# Output only. A URL in the Chat message `text` field that matches a link
|
|
165
|
+
# preview pattern. For more information, see [Preview
|
|
166
166
|
# links](https://developers.google.com/workspace/chat/preview-links).
|
|
167
167
|
# @!attribute [r] thread_reply
|
|
168
168
|
# @return [::Boolean]
|
|
@@ -644,9 +644,9 @@ module Google
|
|
|
644
644
|
# (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
|
|
645
645
|
NOTIFICATION_TYPE_FORCE_NOTIFY = 2
|
|
646
646
|
|
|
647
|
-
#
|
|
648
|
-
#
|
|
649
|
-
#
|
|
647
|
+
# Do not notify recipients, and do not mark the message as unread.
|
|
648
|
+
# This behaves similarly to the user muting the conversation or enabling
|
|
649
|
+
# [Chat Do Not Disturb](https://support.google.com/chat/answer/9093489).
|
|
650
650
|
#
|
|
651
651
|
# Requires [app authentication]
|
|
652
652
|
# (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
|
|
@@ -801,6 +801,241 @@ module Google
|
|
|
801
801
|
include ::Google::Protobuf::MessageExts
|
|
802
802
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
803
803
|
end
|
|
804
|
+
|
|
805
|
+
# Request message for searching messages.
|
|
806
|
+
# @!attribute [rw] parent
|
|
807
|
+
# @return [::String]
|
|
808
|
+
# Required. The resource name of the space to search within.
|
|
809
|
+
#
|
|
810
|
+
# To search across all spaces the user has access to, set this field to
|
|
811
|
+
# `spaces/-`. Using any other value for `parent` results in an
|
|
812
|
+
# `INVALID_ARGUMENT` error.
|
|
813
|
+
#
|
|
814
|
+
# To limit the search to one or more spaces, use `space.name` or
|
|
815
|
+
# `space.display_name` in the `filter`.
|
|
816
|
+
# @!attribute [rw] filter
|
|
817
|
+
# @return [::String]
|
|
818
|
+
# Required. A search query.
|
|
819
|
+
#
|
|
820
|
+
# The query can specify one or more search keywords, which are used to filter
|
|
821
|
+
# the results,
|
|
822
|
+
#
|
|
823
|
+
# You can also filter the results using the following message fields:
|
|
824
|
+
#
|
|
825
|
+
# - `create_time`: Accepts a timestamp in
|
|
826
|
+
# [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the
|
|
827
|
+
# supported comparison operators are: `<` and `>=`.
|
|
828
|
+
# - `sender.name`: The resource name of the sender (`users/{user}`). Only
|
|
829
|
+
# supports `=`. You can use the e-mail as an alias for `{user}`. For
|
|
830
|
+
# example, `users/example@gmail.com`, where `example@gmail.com` is the
|
|
831
|
+
# e-mail of the Google Chat user.
|
|
832
|
+
# - `space.name`: The resource name of the space where the message is posted.
|
|
833
|
+
# (`spaces/{space}`). Only supports `=`. If this filter is not set, the
|
|
834
|
+
# search is performed across all direct messages and spaces the user has
|
|
835
|
+
# access to as a space member.
|
|
836
|
+
# - `space.display_name`: Supports the operator `:` (has) and filters spaces
|
|
837
|
+
# based on a partial match of their display name. Results are limited to
|
|
838
|
+
# the top five space matches. For example, `space.display_name:Project`
|
|
839
|
+
# searches for messages in the top five spaces that contain the word
|
|
840
|
+
# "Project" in their display names.
|
|
841
|
+
# - `attachment`: Supports the operator `:*` (has any) to check for the
|
|
842
|
+
# presence of attachments. If `attachment:*` is specified, only messages
|
|
843
|
+
# that have at least one attachment are returned.
|
|
844
|
+
# - `annotations.user_mentions.user.name`: The resource name of the mentioned
|
|
845
|
+
# user (`users/{user}`). Only supports `:` (has). For example:
|
|
846
|
+
# `annotations.user_mentions.user.name:"users/1234567890"` returns only
|
|
847
|
+
# messages that contain a mention to the specified user. Alternatively, the
|
|
848
|
+
# alias `me` can be used to filter for messages that mention the caller
|
|
849
|
+
# user, for example: `annotations.user_mentions.user.name:users/me`. You
|
|
850
|
+
# can also use the e-mail as an alias for `{user}`, for example,
|
|
851
|
+
# `users/example@gmail.com`.
|
|
852
|
+
#
|
|
853
|
+
# For advanced filtering, the following functions are also available:
|
|
854
|
+
#
|
|
855
|
+
# - `has_link()`: Returns only messages that have at least one hyperlink in
|
|
856
|
+
# the message text.
|
|
857
|
+
# - `is_unread()`: Filters out messages that have been read by the calling
|
|
858
|
+
# user.
|
|
859
|
+
#
|
|
860
|
+
# Using the `space.display_name` filter requires that the calling credentials
|
|
861
|
+
# include one of the following [authorization
|
|
862
|
+
# scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
863
|
+
#
|
|
864
|
+
# - `https://www.googleapis.com/auth/chat.spaces.readonly`
|
|
865
|
+
# - `https://www.googleapis.com/auth/chat.spaces`
|
|
866
|
+
#
|
|
867
|
+
# Using the `is_unread()` filter requires that the calling credentials
|
|
868
|
+
# include one of the following [authorization
|
|
869
|
+
# scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
870
|
+
#
|
|
871
|
+
# - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
|
|
872
|
+
# - `https://www.googleapis.com/auth/chat.users.readstate`
|
|
873
|
+
#
|
|
874
|
+
#
|
|
875
|
+
# Across different fields, only `AND` operators are supported. A valid
|
|
876
|
+
# example is `sender.name = "users/1234567890" AND is_unread()`. The word
|
|
877
|
+
# `AND` is optional and is implied if omitted. For example, `sender.name =
|
|
878
|
+
# "users/1234567890" is_unread()` is valid and is equivalent to the previous
|
|
879
|
+
# example. An invalid example is `sender.name = "users/1234567890" OR
|
|
880
|
+
# is_unread()` because `OR` is not supported between different fields.
|
|
881
|
+
#
|
|
882
|
+
# Among the same field:
|
|
883
|
+
#
|
|
884
|
+
# - `create_time` supports only `AND`, and can only be used to represent
|
|
885
|
+
# an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND
|
|
886
|
+
# create_time < "2023-01-01T00:00:00+00:00"`.
|
|
887
|
+
# - `sender.name` supports only the `OR` operator, for example:
|
|
888
|
+
# `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`.
|
|
889
|
+
# - `space.name` supports only the `OR` operator, for example:
|
|
890
|
+
# `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`.
|
|
891
|
+
# - `space.display_name` supports the operators `AND` and `OR`, but not a
|
|
892
|
+
# mix of both. For example:
|
|
893
|
+
# `space.display_name:Project AND space.display_name:Tasks` returns
|
|
894
|
+
# messages that are in spaces with display names containing both `Project`
|
|
895
|
+
# and `Tasks`, whereas
|
|
896
|
+
# `space.display_name:Project OR space.display_name:Tasks` returns messages
|
|
897
|
+
# that are in spaces with display names containing either `Project` or
|
|
898
|
+
# `Tasks` or both.
|
|
899
|
+
# - `annotations.user_mentions.user.name` supports the operators `AND` and
|
|
900
|
+
# `OR`, but not a mix of both. For example:
|
|
901
|
+
# `annotations.user_mentions.user.name:"users/1234567890" AND
|
|
902
|
+
# annotations.user_mentions.user.name:"users/0987654321"` returns only
|
|
903
|
+
# messages that mentions both users, whereas
|
|
904
|
+
# `annotations.user_mentions.user.name:"users/1234567890" OR
|
|
905
|
+
# annotations.user_mentions.user.name:"users/0987654321"` returns messages
|
|
906
|
+
# that mention either user or both.
|
|
907
|
+
#
|
|
908
|
+
# Parentheses are required to disambiguate operator precedence when combining
|
|
909
|
+
# `AND` and `OR` operators in the same query. For example:
|
|
910
|
+
# `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`.
|
|
911
|
+
# Otherwise, parentheses are optional.
|
|
912
|
+
#
|
|
913
|
+
# The following example queries are valid:
|
|
914
|
+
#
|
|
915
|
+
# ```
|
|
916
|
+
# "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
|
|
917
|
+
#
|
|
918
|
+
# sender.name = "users/example@gmail.com"
|
|
919
|
+
#
|
|
920
|
+
# annotations.user_mentions.user.name:"users/0987654321"
|
|
921
|
+
#
|
|
922
|
+
# attachment:* AND space.name = "spaces/ABCDEFGH"
|
|
923
|
+
#
|
|
924
|
+
# tasks AND is_unread() AND sender.name = "users/1234567890"
|
|
925
|
+
#
|
|
926
|
+
# "things to do" "urgent"
|
|
927
|
+
#
|
|
928
|
+
# (sender.name = "users/1234567890")
|
|
929
|
+
# AND (create_time < "2023-05-01T00:00:00Z")
|
|
930
|
+
#
|
|
931
|
+
# tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
|
|
932
|
+
#
|
|
933
|
+
# "project one" is_unread()
|
|
934
|
+
#
|
|
935
|
+
# space.display_name:Project tasks
|
|
936
|
+
# ```
|
|
937
|
+
#
|
|
938
|
+
# The maximum query length is 1,000 characters.
|
|
939
|
+
#
|
|
940
|
+
# Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
|
|
941
|
+
# error.
|
|
942
|
+
# @!attribute [rw] page_size
|
|
943
|
+
# @return [::Integer]
|
|
944
|
+
# Optional. The maximum number of results to return. The service may return
|
|
945
|
+
# fewer than this value.
|
|
946
|
+
#
|
|
947
|
+
# If unspecified, at most 25 are returned.
|
|
948
|
+
#
|
|
949
|
+
# The maximum value is 100. If you use a value more than 100, it's
|
|
950
|
+
# automatically changed to 100.
|
|
951
|
+
# @!attribute [rw] page_token
|
|
952
|
+
# @return [::String]
|
|
953
|
+
# Optional. A token, received from the previous search messages call. Provide
|
|
954
|
+
# this parameter to retrieve the subsequent page.
|
|
955
|
+
#
|
|
956
|
+
# When paginating, all other parameters provided should match the call that
|
|
957
|
+
# provided the page token. Passing different values to the other parameters
|
|
958
|
+
# might lead to unexpected results.
|
|
959
|
+
# @!attribute [rw] order_by
|
|
960
|
+
# @return [::String]
|
|
961
|
+
# Optional. How the results list is ordered.
|
|
962
|
+
#
|
|
963
|
+
# Supported attributes to order by are:
|
|
964
|
+
#
|
|
965
|
+
# - `create_time`: Sorts the results by the time of the message creation.
|
|
966
|
+
# Default value.
|
|
967
|
+
# - `relevance`: Sorts the results by relevance.
|
|
968
|
+
# [Developer Preview](https://developers.google.com/workspace/preview).
|
|
969
|
+
#
|
|
970
|
+
# The default ordering is `create_time desc`. Only a single order per query
|
|
971
|
+
# (`create_time` or `relevance`) is supported. Only descending order (`desc`)
|
|
972
|
+
# is supported, and it must be specified after the order attribute.
|
|
973
|
+
# @!attribute [rw] view
|
|
974
|
+
# @return [::Google::Apps::Chat::V1::SearchMessagesRequest::SearchMessagesView]
|
|
975
|
+
# Optional. Specifies what kind of search results view to return. The default
|
|
976
|
+
# is `SEARCH_MESSAGES_VIEW_BASIC`.
|
|
977
|
+
class SearchMessagesRequest
|
|
978
|
+
include ::Google::Protobuf::MessageExts
|
|
979
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
980
|
+
|
|
981
|
+
# The kinds of view that are supported for partial search results.
|
|
982
|
+
module SearchMessagesView
|
|
983
|
+
# The default / unset value.
|
|
984
|
+
# The API will default to the BASIC view.
|
|
985
|
+
SEARCH_MESSAGES_VIEW_UNSPECIFIED = 0
|
|
986
|
+
|
|
987
|
+
# Includes only the matched messages in the results, but no additional
|
|
988
|
+
# metadata. This is the default value.
|
|
989
|
+
SEARCH_MESSAGES_VIEW_BASIC = 1
|
|
990
|
+
|
|
991
|
+
# Includes everything in the results: the matched messages and additional
|
|
992
|
+
# metadata.
|
|
993
|
+
SEARCH_MESSAGES_VIEW_FULL = 2
|
|
994
|
+
end
|
|
995
|
+
end
|
|
996
|
+
|
|
997
|
+
# Response message for searching messages.
|
|
998
|
+
# @!attribute [rw] results
|
|
999
|
+
# @return [::Array<::Google::Apps::Chat::V1::SearchMessageResult>]
|
|
1000
|
+
# The list of search results that matched the query.
|
|
1001
|
+
# @!attribute [rw] next_page_token
|
|
1002
|
+
# @return [::String]
|
|
1003
|
+
# A token that can be used to retrieve the next page. If this field is empty,
|
|
1004
|
+
# there are no subsequent pages.
|
|
1005
|
+
class SearchMessagesResponse
|
|
1006
|
+
include ::Google::Protobuf::MessageExts
|
|
1007
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
1008
|
+
end
|
|
1009
|
+
|
|
1010
|
+
# A single result item from a message search.
|
|
1011
|
+
# @!attribute [rw] message
|
|
1012
|
+
# @return [::Google::Apps::Chat::V1::Message]
|
|
1013
|
+
# The matched message.
|
|
1014
|
+
# @!attribute [rw] read
|
|
1015
|
+
# @return [::Boolean]
|
|
1016
|
+
# Indicates if the matched message is read by the calling user.
|
|
1017
|
+
#
|
|
1018
|
+
# Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
|
|
1019
|
+
# calling credentials include one of the following [authorization
|
|
1020
|
+
# scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1021
|
+
#
|
|
1022
|
+
# - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
|
|
1023
|
+
# - `https://www.googleapis.com/auth/chat.users.readstate`
|
|
1024
|
+
# @!attribute [rw] space_mute_setting
|
|
1025
|
+
# @return [::Google::Apps::Chat::V1::SpaceNotificationSetting::MuteSetting]
|
|
1026
|
+
# The mute setting of the calling user for the space where the message is
|
|
1027
|
+
# posted. The caller app can use this information to decide how to process
|
|
1028
|
+
# the message depending on whether the space is muted for the user or not.
|
|
1029
|
+
#
|
|
1030
|
+
# Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
|
|
1031
|
+
# calling credentials include the following [authorization
|
|
1032
|
+
# scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1033
|
+
#
|
|
1034
|
+
# - `https://www.googleapis.com/auth/chat.users.spacesettings`
|
|
1035
|
+
class SearchMessageResult
|
|
1036
|
+
include ::Google::Protobuf::MessageExts
|
|
1037
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
|
1038
|
+
end
|
|
804
1039
|
end
|
|
805
1040
|
end
|
|
806
1041
|
end
|
|
@@ -413,17 +413,20 @@ module Google
|
|
|
413
413
|
# Reserved.
|
|
414
414
|
SPACE_THREADING_STATE_UNSPECIFIED = 0
|
|
415
415
|
|
|
416
|
-
#
|
|
417
|
-
#
|
|
418
|
-
#
|
|
416
|
+
# Spaces that support message threads. When users respond to a message,
|
|
417
|
+
# they can reply in-thread, which keeps their response in the context of
|
|
418
|
+
# the original message.
|
|
419
419
|
THREADED_MESSAGES = 2
|
|
420
420
|
|
|
421
421
|
# Named spaces where the conversation is organized by topic. Topics and
|
|
422
422
|
# their replies are grouped together.
|
|
423
423
|
GROUPED_MESSAGES = 3
|
|
424
424
|
|
|
425
|
-
#
|
|
426
|
-
#
|
|
425
|
+
# Spaces that don't support message threading. This space threading state
|
|
426
|
+
# is only used for special cases including:
|
|
427
|
+
#
|
|
428
|
+
# * Continuous meeting chat where threading is intentionally turned off.
|
|
429
|
+
# * Legacy group conversations that were created prior to 2022.
|
|
427
430
|
UNTHREADED_MESSAGES = 4
|
|
428
431
|
end
|
|
429
432
|
|