diff --git a/java-accessapproval/README.md b/java-accessapproval/README.md
index 948d60ef1911..6a8b2a7353bb 100644
--- a/java-accessapproval/README.md
+++ b/java-accessapproval/README.md
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
SearchMessages
Searches for messages in Google Chat that the calling user has access to. Returns a list of messages matching the search criteria. + *
To search across all spaces the user has access to, set `parent` to `spaces/-`. Using any other value for `parent` results in an `INVALID_ARGUMENT` error. The returned messages have their `name` field populated with the full resource name, which includes the specific `space` in which the message resides. + *
This API doesn't return all message types. The types of messages listed below aren't included in the response. Use [ListMessages][google.chat.v1.ChatService.ListMessages] to list all messages. + *
- Private Messages that are visible to the authenticated user. - Messages posted by Chat apps in spaces or group chats. - Messages in a Chat app DM. - Messages from blocked users. - Messages in spaces that the caller has muted. + *
Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following [authorization scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): + *
- `https://www.googleapis.com/auth/chat.messages.readonly` - `https://www.googleapis.com/auth/chat.messages`
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *searchMessages(SearchMessagesRequest request) + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *searchMessages(SpaceName parent, String filter) + *
searchMessages(String parent, String filter) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *searchMessagesPagedCallable() + *
searchMessagesCallable() + *
GetAttachment
Gets the metadata of a message attachment. The attachment data is fetched using the [media API](https://developers.google.com/workspace/chat/api/reference/rest/v1/media/download). For an example, see [Get metadata about a message attachment](https://developers.google.com/workspace/chat/get-media-attachments). *
Requires [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with the [authorization scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
@@ -2862,6 +2887,450 @@ public final UnaryCallable To search across all spaces the user has access to, set `parent` to `spaces/-`. Using any
+ * other value for `parent` results in an `INVALID_ARGUMENT` error. The returned messages have
+ * their `name` field populated with the full resource name, which includes the specific `space`
+ * in which the message resides.
+ *
+ * This API doesn't return all message types. The types of messages listed below aren't
+ * included in the response. Use [ListMessages][google.chat.v1.ChatService.ListMessages] to list
+ * all messages.
+ *
+ * - Private Messages that are visible to the authenticated user. - Messages posted by Chat
+ * apps in spaces or group chats. - Messages in a Chat app DM. - Messages from blocked users. -
+ * Messages in spaces that the caller has muted.
+ *
+ * Requires [user
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+ * with one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.messages.readonly` -
+ * `https://www.googleapis.com/auth/chat.messages`
+ *
+ * Sample code:
+ *
+ * To search across all spaces the user has access to, set this field to `spaces/-`. Using
+ * any other value for `parent` results in an `INVALID_ARGUMENT` error.
+ * To limit the search to one or more spaces, use `space.name` or `space.display_name` in
+ * the `filter`.
+ * @param filter Required. A search query.
+ * The query can specify one or more search keywords, which are used to filter the results,
+ * You can also filter the results using the following message fields:
+ * - `create_time`: Accepts a timestamp in
+ * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported comparison
+ * operators are: `<` and `>=`. - `sender.name`: The resource name of the sender
+ * (`users/{user}`). Only supports `=`. You can use the e-mail as an alias for `{user}`. For
+ * example, `users/example{@literal @}gmail.com`, where `example{@literal @}gmail.com` is the
+ * e-mail of the Google Chat user. - `space.name`: The resource name of the space where the
+ * message is posted. (`spaces/{space}`). Only supports `=`. If this filter is not set, the
+ * search is performed across all direct messages and spaces the user has access to as a space
+ * member. - `space.display_name`: Supports the operator `:` (has) and filters spaces based on
+ * a partial match of their display name. Results are limited to the top five space matches.
+ * For example, `space.display_name:Project` searches for messages in the top five spaces that
+ * contain the word "Project" in their display names. - `attachment`: Supports the operator
+ * `:*` (has any) to check for the presence of attachments. If `attachment:*` is
+ * specified, only messages that have at least one attachment are returned. -
+ * `annotations.user_mentions.user.name`: The resource name of the mentioned user
+ * (`users/{user}`). Only supports `:` (has). For example:
+ * `annotations.user_mentions.user.name:"users/1234567890"` returns only messages that contain
+ * a mention to the specified user. Alternatively, the alias `me` can be used to filter for
+ * messages that mention the caller user, for example:
+ * `annotations.user_mentions.user.name:users/me`. You can also use the e-mail as an alias for
+ * `{user}`, for example, `users/example{@literal @}gmail.com`.
+ * For advanced filtering, the following functions are also available:
+ * - `has_link()`: Returns only messages that have at least one hyperlink in the message
+ * text. - `is_unread()`: Filters out messages that have been read by the calling user.
+ * Using the `space.display_name` filter requires that the calling credentials include one
+ * of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ * - `https://www.googleapis.com/auth/chat.spaces.readonly` -
+ * `https://www.googleapis.com/auth/chat.spaces`
+ * Using the `is_unread()` filter requires that the calling credentials include one of the
+ * following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ * - `https://www.googleapis.com/auth/chat.users.readstate.readonly` -
+ * `https://www.googleapis.com/auth/chat.users.readstate`
+ * Across different fields, only `AND` operators are supported. A valid example is
+ * `sender.name = "users/1234567890" AND is_unread()`. The word `AND` is optional and is
+ * implied if omitted. For example, `sender.name = "users/1234567890" is_unread()` is valid
+ * and is equivalent to the previous example. An invalid example is `sender.name =
+ * "users/1234567890" OR is_unread()` because `OR` is not supported between different fields.
+ * Among the same field:
+ * - `create_time` supports only `AND`, and can only be used to represent an interval, such
+ * as `create_time >= "2022-01-01T00:00:00+00:00" AND create_time <
+ * "2023-01-01T00:00:00+00:00"`. - `sender.name` supports only the `OR` operator, for example:
+ * `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`. - `space.name`
+ * supports only the `OR` operator, for example: `space.name = "spaces/ABCDEFGH" OR space.name
+ * = "spaces/QWERTYUI"`. - `space.display_name` supports the operators `AND` and `OR`, but not
+ * a mix of both. For example: `space.display_name:Project AND space.display_name:Tasks`
+ * returns messages that are in spaces with display names containing both `Project` and
+ * `Tasks`, whereas `space.display_name:Project OR space.display_name:Tasks` returns messages
+ * that are in spaces with display names containing either `Project` or `Tasks` or both. -
+ * `annotations.user_mentions.user.name` supports the operators `AND` and `OR`, but not a mix
+ * of both. For example: `annotations.user_mentions.user.name:"users/1234567890" AND
+ * annotations.user_mentions.user.name:"users/0987654321"` returns only messages that mentions
+ * both users, whereas `annotations.user_mentions.user.name:"users/1234567890" OR
+ * annotations.user_mentions.user.name:"users/0987654321"` returns messages that mention
+ * either user or both.
+ * Parentheses are required to disambiguate operator precedence when combining `AND` and
+ * `OR` operators in the same query. For example: `(sender.name="users/me" OR
+ * sender.name="users/123456") AND is_unread()`. Otherwise, parentheses are optional.
+ * The following example queries are valid:
+ * ``` "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
+ * sender.name = "users/example{@literal @}gmail.com"
+ * annotations.user_mentions.user.name:"users/0987654321"
+ * attachment:* AND space.name = "spaces/ABCDEFGH"
+ * tasks AND is_unread() AND sender.name = "users/1234567890"
+ * "things to do" "urgent"
+ * (sender.name = "users/1234567890") AND (create_time < "2023-05-01T00:00:00Z")
+ * tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
+ * "project one" is_unread()
+ * space.display_name:Project tasks ```
+ * The maximum query length is 1,000 characters.
+ * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchMessagesPagedResponse searchMessages(
+ @Nullable SpaceName parent, String filter) {
+ SearchMessagesRequest request =
+ SearchMessagesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setFilter(filter)
+ .build();
+ return searchMessages(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches for messages in Google Chat that the calling user has access to. Returns a list of
+ * messages matching the search criteria.
+ *
+ * To search across all spaces the user has access to, set `parent` to `spaces/-`. Using any
+ * other value for `parent` results in an `INVALID_ARGUMENT` error. The returned messages have
+ * their `name` field populated with the full resource name, which includes the specific `space`
+ * in which the message resides.
+ *
+ * This API doesn't return all message types. The types of messages listed below aren't
+ * included in the response. Use [ListMessages][google.chat.v1.ChatService.ListMessages] to list
+ * all messages.
+ *
+ * - Private Messages that are visible to the authenticated user. - Messages posted by Chat
+ * apps in spaces or group chats. - Messages in a Chat app DM. - Messages from blocked users. -
+ * Messages in spaces that the caller has muted.
+ *
+ * Requires [user
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+ * with one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.messages.readonly` -
+ * `https://www.googleapis.com/auth/chat.messages`
+ *
+ * Sample code:
+ *
+ * To search across all spaces the user has access to, set this field to `spaces/-`. Using
+ * any other value for `parent` results in an `INVALID_ARGUMENT` error.
+ * To limit the search to one or more spaces, use `space.name` or `space.display_name` in
+ * the `filter`.
+ * @param filter Required. A search query.
+ * The query can specify one or more search keywords, which are used to filter the results,
+ * You can also filter the results using the following message fields:
+ * - `create_time`: Accepts a timestamp in
+ * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported comparison
+ * operators are: `<` and `>=`. - `sender.name`: The resource name of the sender
+ * (`users/{user}`). Only supports `=`. You can use the e-mail as an alias for `{user}`. For
+ * example, `users/example{@literal @}gmail.com`, where `example{@literal @}gmail.com` is the
+ * e-mail of the Google Chat user. - `space.name`: The resource name of the space where the
+ * message is posted. (`spaces/{space}`). Only supports `=`. If this filter is not set, the
+ * search is performed across all direct messages and spaces the user has access to as a space
+ * member. - `space.display_name`: Supports the operator `:` (has) and filters spaces based on
+ * a partial match of their display name. Results are limited to the top five space matches.
+ * For example, `space.display_name:Project` searches for messages in the top five spaces that
+ * contain the word "Project" in their display names. - `attachment`: Supports the operator
+ * `:*` (has any) to check for the presence of attachments. If `attachment:*` is
+ * specified, only messages that have at least one attachment are returned. -
+ * `annotations.user_mentions.user.name`: The resource name of the mentioned user
+ * (`users/{user}`). Only supports `:` (has). For example:
+ * `annotations.user_mentions.user.name:"users/1234567890"` returns only messages that contain
+ * a mention to the specified user. Alternatively, the alias `me` can be used to filter for
+ * messages that mention the caller user, for example:
+ * `annotations.user_mentions.user.name:users/me`. You can also use the e-mail as an alias for
+ * `{user}`, for example, `users/example{@literal @}gmail.com`.
+ * For advanced filtering, the following functions are also available:
+ * - `has_link()`: Returns only messages that have at least one hyperlink in the message
+ * text. - `is_unread()`: Filters out messages that have been read by the calling user.
+ * Using the `space.display_name` filter requires that the calling credentials include one
+ * of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ * - `https://www.googleapis.com/auth/chat.spaces.readonly` -
+ * `https://www.googleapis.com/auth/chat.spaces`
+ * Using the `is_unread()` filter requires that the calling credentials include one of the
+ * following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ * - `https://www.googleapis.com/auth/chat.users.readstate.readonly` -
+ * `https://www.googleapis.com/auth/chat.users.readstate`
+ * Across different fields, only `AND` operators are supported. A valid example is
+ * `sender.name = "users/1234567890" AND is_unread()`. The word `AND` is optional and is
+ * implied if omitted. For example, `sender.name = "users/1234567890" is_unread()` is valid
+ * and is equivalent to the previous example. An invalid example is `sender.name =
+ * "users/1234567890" OR is_unread()` because `OR` is not supported between different fields.
+ * Among the same field:
+ * - `create_time` supports only `AND`, and can only be used to represent an interval, such
+ * as `create_time >= "2022-01-01T00:00:00+00:00" AND create_time <
+ * "2023-01-01T00:00:00+00:00"`. - `sender.name` supports only the `OR` operator, for example:
+ * `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`. - `space.name`
+ * supports only the `OR` operator, for example: `space.name = "spaces/ABCDEFGH" OR space.name
+ * = "spaces/QWERTYUI"`. - `space.display_name` supports the operators `AND` and `OR`, but not
+ * a mix of both. For example: `space.display_name:Project AND space.display_name:Tasks`
+ * returns messages that are in spaces with display names containing both `Project` and
+ * `Tasks`, whereas `space.display_name:Project OR space.display_name:Tasks` returns messages
+ * that are in spaces with display names containing either `Project` or `Tasks` or both. -
+ * `annotations.user_mentions.user.name` supports the operators `AND` and `OR`, but not a mix
+ * of both. For example: `annotations.user_mentions.user.name:"users/1234567890" AND
+ * annotations.user_mentions.user.name:"users/0987654321"` returns only messages that mentions
+ * both users, whereas `annotations.user_mentions.user.name:"users/1234567890" OR
+ * annotations.user_mentions.user.name:"users/0987654321"` returns messages that mention
+ * either user or both.
+ * Parentheses are required to disambiguate operator precedence when combining `AND` and
+ * `OR` operators in the same query. For example: `(sender.name="users/me" OR
+ * sender.name="users/123456") AND is_unread()`. Otherwise, parentheses are optional.
+ * The following example queries are valid:
+ * ``` "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
+ * sender.name = "users/example{@literal @}gmail.com"
+ * annotations.user_mentions.user.name:"users/0987654321"
+ * attachment:* AND space.name = "spaces/ABCDEFGH"
+ * tasks AND is_unread() AND sender.name = "users/1234567890"
+ * "things to do" "urgent"
+ * (sender.name = "users/1234567890") AND (create_time < "2023-05-01T00:00:00Z")
+ * tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
+ * "project one" is_unread()
+ * space.display_name:Project tasks ```
+ * The maximum query length is 1,000 characters.
+ * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchMessagesPagedResponse searchMessages(String parent, String filter) {
+ SearchMessagesRequest request =
+ SearchMessagesRequest.newBuilder().setParent(parent).setFilter(filter).build();
+ return searchMessages(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches for messages in Google Chat that the calling user has access to. Returns a list of
+ * messages matching the search criteria.
+ *
+ * To search across all spaces the user has access to, set `parent` to `spaces/-`. Using any
+ * other value for `parent` results in an `INVALID_ARGUMENT` error. The returned messages have
+ * their `name` field populated with the full resource name, which includes the specific `space`
+ * in which the message resides.
+ *
+ * This API doesn't return all message types. The types of messages listed below aren't
+ * included in the response. Use [ListMessages][google.chat.v1.ChatService.ListMessages] to list
+ * all messages.
+ *
+ * - Private Messages that are visible to the authenticated user. - Messages posted by Chat
+ * apps in spaces or group chats. - Messages in a Chat app DM. - Messages from blocked users. -
+ * Messages in spaces that the caller has muted.
+ *
+ * Requires [user
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+ * with one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.messages.readonly` -
+ * `https://www.googleapis.com/auth/chat.messages`
+ *
+ * Sample code:
+ *
+ * To search across all spaces the user has access to, set `parent` to `spaces/-`. Using any
+ * other value for `parent` results in an `INVALID_ARGUMENT` error. The returned messages have
+ * their `name` field populated with the full resource name, which includes the specific `space`
+ * in which the message resides.
+ *
+ * This API doesn't return all message types. The types of messages listed below aren't
+ * included in the response. Use [ListMessages][google.chat.v1.ChatService.ListMessages] to list
+ * all messages.
+ *
+ * - Private Messages that are visible to the authenticated user. - Messages posted by Chat
+ * apps in spaces or group chats. - Messages in a Chat app DM. - Messages from blocked users. -
+ * Messages in spaces that the caller has muted.
+ *
+ * Requires [user
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+ * with one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.messages.readonly` -
+ * `https://www.googleapis.com/auth/chat.messages`
+ *
+ * Sample code:
+ *
+ * To search across all spaces the user has access to, set `parent` to `spaces/-`. Using any
+ * other value for `parent` results in an `INVALID_ARGUMENT` error. The returned messages have
+ * their `name` field populated with the full resource name, which includes the specific `space`
+ * in which the message resides.
+ *
+ * This API doesn't return all message types. The types of messages listed below aren't
+ * included in the response. Use [ListMessages][google.chat.v1.ChatService.ListMessages] to list
+ * all messages.
+ *
+ * - Private Messages that are visible to the authenticated user. - Messages posted by Chat
+ * apps in spaces or group chats. - Messages in a Chat app DM. - Messages from blocked users. -
+ * Messages in spaces that the caller has muted.
+ *
+ * Requires [user
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+ * with one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.messages.readonly` -
+ * `https://www.googleapis.com/auth/chat.messages`
+ *
+ * Sample code:
+ *
+ * This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the HostsClient object to clean up resources such as
+ * threads. In the example above, try-with-resources is used, which automatically calls close().
+ *
+ * Get Retrieves information about the specified host. Request object method variants only take one parameter, a request object, which must be constructed before the call. get(GetHostRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. get(String project, String zone, String association, String host)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getCallable()
+ * GetVersion Allows customers to get SBOM versions of a host. Request object method variants only take one parameter, a request object, which must be constructed before the call. getVersionAsync(GetVersionHostRequest request)
+ * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. getVersionAsync(String project, String zone, String association, String host, HostsGetVersionRequest hostsGetVersionRequestResource)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getVersionOperationCallable()
+ * getVersionCallable()
+ * List Retrieves a list of hosts. Request object method variants only take one parameter, a request object, which must be constructed before the call. list(ListHostsRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. list(String project, String zone, String association)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listPagedCallable()
+ * listCallable()
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of HostsSettings to create(). For
+ * example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class HostsClient implements BackgroundResource {
+ private final @Nullable HostsSettings settings;
+ private final HostsStub stub;
+
+ /** Constructs an instance of HostsClient with default settings. */
+ public static final HostsClient create() throws IOException {
+ return create(HostsSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of HostsClient, using the given settings. The channels are created based
+ * on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final HostsClient create(HostsSettings settings) throws IOException {
+ return new HostsClient(settings);
+ }
+
+ /**
+ * Constructs an instance of HostsClient, using the given stub for making calls. This is for
+ * advanced usage - prefer using create(HostsSettings).
+ */
+ public static final HostsClient create(HostsStub stub) {
+ return new HostsClient(stub);
+ }
+
+ /**
+ * Constructs an instance of HostsClient, using the given settings. This is protected so that it
+ * is easy to make a subclass, but otherwise, the static factory methods should be preferred.
+ */
+ protected HostsClient(HostsSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((HostsStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected HostsClient(HostsStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final @Nullable HostsSettings getSettings() {
+ return settings;
+ }
+
+ public HostsStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves information about the specified host.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of get:
+ *
+ * To configure the RetrySettings of a Long Running Operation method, create an
+ * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
+ * configure the RetrySettings for getVersion:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the ReliabilityRisksClient object to clean up resources
+ * such as threads. In the example above, try-with-resources is used, which automatically calls
+ * close().
+ *
+ * Get Returns the specified ReliabilityRisk resource. Request object method variants only take one parameter, a request object, which must be constructed before the call. get(GetReliabilityRiskRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. get(String project, String reliabilityRisk)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getCallable()
+ * List Retrieves the list of reliabilityRisks available in the specified project. Request object method variants only take one parameter, a request object, which must be constructed before the call. list(ListReliabilityRisksRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. list(String project)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listPagedCallable()
+ * listCallable()
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of ReliabilityRisksSettings to
+ * create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class ReliabilityRisksClient implements BackgroundResource {
+ private final @Nullable ReliabilityRisksSettings settings;
+ private final ReliabilityRisksStub stub;
+
+ /** Constructs an instance of ReliabilityRisksClient with default settings. */
+ public static final ReliabilityRisksClient create() throws IOException {
+ return create(ReliabilityRisksSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of ReliabilityRisksClient, using the given settings. The channels are
+ * created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final ReliabilityRisksClient create(ReliabilityRisksSettings settings)
+ throws IOException {
+ return new ReliabilityRisksClient(settings);
+ }
+
+ /**
+ * Constructs an instance of ReliabilityRisksClient, using the given stub for making calls. This
+ * is for advanced usage - prefer using create(ReliabilityRisksSettings).
+ */
+ public static final ReliabilityRisksClient create(ReliabilityRisksStub stub) {
+ return new ReliabilityRisksClient(stub);
+ }
+
+ /**
+ * Constructs an instance of ReliabilityRisksClient, using the given settings. This is protected
+ * so that it is easy to make a subclass, but otherwise, the static factory methods should be
+ * preferred.
+ */
+ protected ReliabilityRisksClient(ReliabilityRisksSettings settings) throws IOException {
+ this.settings = settings;
+ this.stub = ((ReliabilityRisksStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected ReliabilityRisksClient(ReliabilityRisksStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final @Nullable ReliabilityRisksSettings getSettings() {
+ return settings;
+ }
+
+ public ReliabilityRisksStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns the specified ReliabilityRisk resource.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of get:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
*
@@ -456,6 +456,27 @@
* }
* } ======================= HostsClient =======================
+ *
+ * Service Description: The Hosts API.
+ *
+ * Sample for HostsClient:
+ *
+ * ======================= ImageFamilyViewsClient =======================
*
* Service Description: The ImageFamilyViews API.
@@ -1862,6 +1883,25 @@
* }
* } ======================= ReliabilityRisksClient =======================
+ *
+ * Service Description: The ReliabilityRisks API.
+ *
+ * Sample for ReliabilityRisksClient:
+ *
+ * ======================= ReservationBlocksClient =======================
*
* Service Description: The ReservationBlocks API.
diff --git a/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HostsStub.java b/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HostsStub.java
new file mode 100644
index 000000000000..5f140f5354cc
--- /dev/null
+++ b/java-compute/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/HostsStub.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.compute.v1.stub;
+
+import static com.google.cloud.compute.v1.HostsClient.ListPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.compute.v1.GetHostRequest;
+import com.google.cloud.compute.v1.GetVersionHostRequest;
+import com.google.cloud.compute.v1.Host;
+import com.google.cloud.compute.v1.HostsListResponse;
+import com.google.cloud.compute.v1.ListHostsRequest;
+import com.google.cloud.compute.v1.Operation;
+import javax.annotation.Generated;
+import org.jspecify.annotations.NullMarked;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the Hosts service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public abstract class HostsStub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of get:
+ *
+ * To configure the RetrySettings of a Long Running Operation method, create an
+ * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
+ * configure the RetrySettings for getVersion:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class HttpJsonHostsCallableFactory
+ implements HttpJsonStubCallableFactory This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class HttpJsonHostsStub extends HostsStub {
+ private static final TypeRegistry typeRegistry =
+ TypeRegistry.newBuilder().add(Operation.getDescriptor()).build();
+
+ private static final ApiMethodDescriptor This class is for advanced usage.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class HttpJsonReliabilityRisksCallableFactory
+ implements HttpJsonStubCallableFactory{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+ * SpaceName parent = SpaceName.of("[SPACE]");
+ * String filter = "filter-1274492040";
+ * for (SearchMessageResult element :
+ * chatServiceClient.searchMessages(parent, filter).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the space to search within.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+ * String parent = SpaceName.of("[SPACE]").toString();
+ * String filter = "filter-1274492040";
+ * for (SearchMessageResult element :
+ * chatServiceClient.searchMessages(parent, filter).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the space to search within.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+ * SearchMessagesRequest request =
+ * SearchMessagesRequest.newBuilder()
+ * .setParent(SpaceName.of("[SPACE]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (SearchMessageResult element : chatServiceClient.searchMessages(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchMessagesPagedResponse searchMessages(SearchMessagesRequest request) {
+ return searchMessagesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches for messages in Google Chat that the calling user has access to. Returns a list of
+ * messages matching the search criteria.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+ * SearchMessagesRequest request =
+ * SearchMessagesRequest.newBuilder()
+ * .setParent(SpaceName.of("[SPACE]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+ * SearchMessagesRequest request =
+ * SearchMessagesRequest.newBuilder()
+ * .setParent(SpaceName.of("[SPACE]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * SearchMessagesResponse response = chatServiceClient.searchMessagesCallable().call(request);
+ * for (SearchMessageResult element : response.getResultsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ * Searches for messages in Google Chat that the calling user has access to.
+ * Returns a list of messages matching the search criteria.
+ * To search across all spaces the user has access to, set `parent` to
+ * `spaces/-`. Using any other value for `parent` results in an
+ * `INVALID_ARGUMENT` error. The returned messages have their `name` field
+ * populated with the full resource name, which includes the specific `space`
+ * in which the message resides.
+ * This API doesn't return all message types. The types of messages listed
+ * below aren't included in the response. Use
+ * [ListMessages][google.chat.v1.ChatService.ListMessages] to list all
+ * messages.
+ * - Private Messages that are visible to the authenticated user.
+ * - Messages posted by Chat apps in spaces or group chats.
+ * - Messages in a Chat app DM.
+ * - Messages from blocked users.
+ * - Messages in spaces that the caller has muted.
+ * Requires [user
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+ * with one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ * - `https://www.googleapis.com/auth/chat.messages.readonly`
+ * - `https://www.googleapis.com/auth/chat.messages`
+ *
+ */
+ default void searchMessages(
+ com.google.chat.v1.SearchMessagesRequest request,
+ io.grpc.stub.StreamObserver
+ * Searches for messages in Google Chat that the calling user has access to.
+ * Returns a list of messages matching the search criteria.
+ * To search across all spaces the user has access to, set `parent` to
+ * `spaces/-`. Using any other value for `parent` results in an
+ * `INVALID_ARGUMENT` error. The returned messages have their `name` field
+ * populated with the full resource name, which includes the specific `space`
+ * in which the message resides.
+ * This API doesn't return all message types. The types of messages listed
+ * below aren't included in the response. Use
+ * [ListMessages][google.chat.v1.ChatService.ListMessages] to list all
+ * messages.
+ * - Private Messages that are visible to the authenticated user.
+ * - Messages posted by Chat apps in spaces or group chats.
+ * - Messages in a Chat app DM.
+ * - Messages from blocked users.
+ * - Messages in spaces that the caller has muted.
+ * Requires [user
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+ * with one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ * - `https://www.googleapis.com/auth/chat.messages.readonly`
+ * - `https://www.googleapis.com/auth/chat.messages`
+ *
+ */
+ public void searchMessages(
+ com.google.chat.v1.SearchMessagesRequest request,
+ io.grpc.stub.StreamObserver
+ * Searches for messages in Google Chat that the calling user has access to.
+ * Returns a list of messages matching the search criteria.
+ * To search across all spaces the user has access to, set `parent` to
+ * `spaces/-`. Using any other value for `parent` results in an
+ * `INVALID_ARGUMENT` error. The returned messages have their `name` field
+ * populated with the full resource name, which includes the specific `space`
+ * in which the message resides.
+ * This API doesn't return all message types. The types of messages listed
+ * below aren't included in the response. Use
+ * [ListMessages][google.chat.v1.ChatService.ListMessages] to list all
+ * messages.
+ * - Private Messages that are visible to the authenticated user.
+ * - Messages posted by Chat apps in spaces or group chats.
+ * - Messages in a Chat app DM.
+ * - Messages from blocked users.
+ * - Messages in spaces that the caller has muted.
+ * Requires [user
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+ * with one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ * - `https://www.googleapis.com/auth/chat.messages.readonly`
+ * - `https://www.googleapis.com/auth/chat.messages`
+ *
+ */
+ public com.google.chat.v1.SearchMessagesResponse searchMessages(
+ com.google.chat.v1.SearchMessagesRequest request) throws io.grpc.StatusException {
+ return io.grpc.stub.ClientCalls.blockingV2UnaryCall(
+ getChannel(), getSearchMessagesMethod(), getCallOptions(), request);
+ }
+
/**
*
*
@@ -6829,6 +6977,40 @@ public com.google.protobuf.Empty deleteMessage(
getChannel(), getDeleteMessageMethod(), getCallOptions(), request);
}
+ /**
+ *
+ *
+ *
+ * Searches for messages in Google Chat that the calling user has access to.
+ * Returns a list of messages matching the search criteria.
+ * To search across all spaces the user has access to, set `parent` to
+ * `spaces/-`. Using any other value for `parent` results in an
+ * `INVALID_ARGUMENT` error. The returned messages have their `name` field
+ * populated with the full resource name, which includes the specific `space`
+ * in which the message resides.
+ * This API doesn't return all message types. The types of messages listed
+ * below aren't included in the response. Use
+ * [ListMessages][google.chat.v1.ChatService.ListMessages] to list all
+ * messages.
+ * - Private Messages that are visible to the authenticated user.
+ * - Messages posted by Chat apps in spaces or group chats.
+ * - Messages in a Chat app DM.
+ * - Messages from blocked users.
+ * - Messages in spaces that the caller has muted.
+ * Requires [user
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+ * with one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ * - `https://www.googleapis.com/auth/chat.messages.readonly`
+ * - `https://www.googleapis.com/auth/chat.messages`
+ *
+ */
+ public com.google.chat.v1.SearchMessagesResponse searchMessages(
+ com.google.chat.v1.SearchMessagesRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getSearchMessagesMethod(), getCallOptions(), request);
+ }
+
/**
*
*
@@ -8264,6 +8446,41 @@ protected ChatServiceFutureStub build(
getChannel().newCall(getDeleteMessageMethod(), getCallOptions()), request);
}
+ /**
+ *
+ *
+ *
+ * Searches for messages in Google Chat that the calling user has access to.
+ * Returns a list of messages matching the search criteria.
+ * To search across all spaces the user has access to, set `parent` to
+ * `spaces/-`. Using any other value for `parent` results in an
+ * `INVALID_ARGUMENT` error. The returned messages have their `name` field
+ * populated with the full resource name, which includes the specific `space`
+ * in which the message resides.
+ * This API doesn't return all message types. The types of messages listed
+ * below aren't included in the response. Use
+ * [ListMessages][google.chat.v1.ChatService.ListMessages] to list all
+ * messages.
+ * - Private Messages that are visible to the authenticated user.
+ * - Messages posted by Chat apps in spaces or group chats.
+ * - Messages in a Chat app DM.
+ * - Messages from blocked users.
+ * - Messages in spaces that the caller has muted.
+ * Requires [user
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+ * with one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ * - `https://www.googleapis.com/auth/chat.messages.readonly`
+ * - `https://www.googleapis.com/auth/chat.messages`
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture<
+ com.google.chat.v1.SearchMessagesResponse>
+ searchMessages(com.google.chat.v1.SearchMessagesRequest request) {
+ return io.grpc.stub.ClientCalls.futureUnaryCall(
+ getChannel().newCall(getSearchMessagesMethod(), getCallOptions()), request);
+ }
+
/**
*
*
@@ -9447,47 +9664,48 @@ public com.google.common.util.concurrent.ListenableFuture
- * Silence the notification as if the recipients have [Chat Do Not
- * Disturb](https://support.google.com/chat/answer/9093489) enabled or
- * have muted the space.
+ * Do not notify recipients, and do not mark the message as unread.
+ * This behaves similarly to the user muting the conversation or enabling
+ * [Chat Do Not Disturb](https://support.google.com/chat/answer/9093489).
*
* Requires [app authentication]
* (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
@@ -171,9 +171,9 @@ public enum NotificationType implements com.google.protobuf.ProtocolMessageEnum
*
*
*
- * Silence the notification as if the recipients have [Chat Do Not
- * Disturb](https://support.google.com/chat/answer/9093489) enabled or
- * have muted the space.
+ * Do not notify recipients, and do not mark the message as unread.
+ * This behaves similarly to the user muting the conversation or enabling
+ * [Chat Do Not Disturb](https://support.google.com/chat/answer/9093489).
*
* Requires [app authentication]
* (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequest.java
index d2ece8258a89..dcec5d02f0d1 100644
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequest.java
+++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequest.java
@@ -398,7 +398,7 @@ public com.google.chat.v1.MessageOrBuilder getMessageOrBuilder() {
*
*
* @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See
- * google/chat/v1/message.proto;l=618
+ * google/chat/v1/message.proto;l=619
* @return The threadKey.
*/
@java.lang.Override
@@ -432,7 +432,7 @@ public java.lang.String getThreadKey() {
*
*
* @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See
- * google/chat/v1/message.proto;l=618
+ * google/chat/v1/message.proto;l=619
* @return The bytes for threadKey.
*/
@java.lang.Override
@@ -1543,7 +1543,7 @@ public com.google.chat.v1.MessageOrBuilder getMessageOrBuilder() {
*
*
* @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See
- * google/chat/v1/message.proto;l=618
+ * google/chat/v1/message.proto;l=619
* @return The threadKey.
*/
@java.lang.Deprecated
@@ -1576,7 +1576,7 @@ public java.lang.String getThreadKey() {
*
*
* @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See
- * google/chat/v1/message.proto;l=618
+ * google/chat/v1/message.proto;l=619
* @return The bytes for threadKey.
*/
@java.lang.Deprecated
@@ -1609,7 +1609,7 @@ public com.google.protobuf.ByteString getThreadKeyBytes() {
*
*
* @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See
- * google/chat/v1/message.proto;l=618
+ * google/chat/v1/message.proto;l=619
* @param value The threadKey to set.
* @return This builder for chaining.
*/
@@ -1641,7 +1641,7 @@ public Builder setThreadKey(java.lang.String value) {
*
*
* @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See
- * google/chat/v1/message.proto;l=618
+ * google/chat/v1/message.proto;l=619
* @return This builder for chaining.
*/
@java.lang.Deprecated
@@ -1669,7 +1669,7 @@ public Builder clearThreadKey() {
*
*
* @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See
- * google/chat/v1/message.proto;l=618
+ * google/chat/v1/message.proto;l=619
* @param value The bytes for threadKey to set.
* @return This builder for chaining.
*/
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequestOrBuilder.java
index e468f02d75fa..ac7a995833ad 100644
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequestOrBuilder.java
+++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequestOrBuilder.java
@@ -114,7 +114,7 @@ public interface CreateMessageRequestOrBuilder
*
*
* @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See
- * google/chat/v1/message.proto;l=618
+ * google/chat/v1/message.proto;l=619
* @return The threadKey.
*/
@java.lang.Deprecated
@@ -137,7 +137,7 @@ public interface CreateMessageRequestOrBuilder
*
*
* @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See
- * google/chat/v1/message.proto;l=618
+ * google/chat/v1/message.proto;l=619
* @return The bytes for threadKey.
*/
@java.lang.Deprecated
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Message.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Message.java
index 54e3d62bd978..c45f8ecd1cdd 100644
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Message.java
+++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Message.java
@@ -499,8 +499,8 @@ public com.google.protobuf.ByteString getTextBytes() {
*
* * [Markup
* syntax](https://developers.google.com/workspace/chat/format-messages)
- * for bold, italic, strikethrough, monospace, monospace block, and bulleted
- * list.
+ * for bold, italic, strikethrough, monospace, monospace block, bulleted
+ * list, and block quote.
*
* * [User
* mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention)
@@ -547,8 +547,8 @@ public java.lang.String getFormattedText() {
*
* * [Markup
* syntax](https://developers.google.com/workspace/chat/format-messages)
- * for bold, italic, strikethrough, monospace, monospace block, and bulleted
- * list.
+ * for bold, italic, strikethrough, monospace, monospace block, bulleted
+ * list, and block quote.
*
* * [User
* mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention)
@@ -1363,8 +1363,8 @@ public com.google.chat.v1.AttachmentOrBuilder getAttachmentOrBuilder(int index)
*
*
*
*
+ *
- * Output only. A URL in `spaces.messages.text` that matches a link preview
- * pattern. For more information, see [Preview
+ * Output only. A URL in the Chat message `text` field that matches a link
+ * preview pattern. For more information, see [Preview
* links](https://developers.google.com/workspace/chat/preview-links).
*
*
@@ -1382,8 +1382,8 @@ public boolean hasMatchedUrl() {
*
*
*
- * Output only. A URL in `spaces.messages.text` that matches a link preview
- * pattern. For more information, see [Preview
+ * Output only. A URL in the Chat message `text` field that matches a link
+ * preview pattern. For more information, see [Preview
* links](https://developers.google.com/workspace/chat/preview-links).
*
*
@@ -1401,8 +1401,8 @@ public com.google.chat.v1.MatchedUrl getMatchedUrl() {
*
*
*
- * Output only. A URL in `spaces.messages.text` that matches a link preview
- * pattern. For more information, see [Preview
+ * Output only. A URL in the Chat message `text` field that matches a link
+ * preview pattern. For more information, see [Preview
* links](https://developers.google.com/workspace/chat/preview-links).
*
*
@@ -4720,8 +4720,8 @@ public Builder setTextBytes(com.google.protobuf.ByteString value) {
*
* * [Markup
* syntax](https://developers.google.com/workspace/chat/format-messages)
- * for bold, italic, strikethrough, monospace, monospace block, and bulleted
- * list.
+ * for bold, italic, strikethrough, monospace, monospace block, bulleted
+ * list, and block quote.
*
* * [User
* mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention)
@@ -4767,8 +4767,8 @@ public java.lang.String getFormattedText() {
*
* * [Markup
* syntax](https://developers.google.com/workspace/chat/format-messages)
- * for bold, italic, strikethrough, monospace, monospace block, and bulleted
- * list.
+ * for bold, italic, strikethrough, monospace, monospace block, bulleted
+ * list, and block quote.
*
* * [User
* mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention)
@@ -4814,8 +4814,8 @@ public com.google.protobuf.ByteString getFormattedTextBytes() {
*
* * [Markup
* syntax](https://developers.google.com/workspace/chat/format-messages)
- * for bold, italic, strikethrough, monospace, monospace block, and bulleted
- * list.
+ * for bold, italic, strikethrough, monospace, monospace block, bulleted
+ * list, and block quote.
*
* * [User
* mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention)
@@ -4860,8 +4860,8 @@ public Builder setFormattedText(java.lang.String value) {
*
* * [Markup
* syntax](https://developers.google.com/workspace/chat/format-messages)
- * for bold, italic, strikethrough, monospace, monospace block, and bulleted
- * list.
+ * for bold, italic, strikethrough, monospace, monospace block, bulleted
+ * list, and block quote.
*
* * [User
* mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention)
@@ -4902,8 +4902,8 @@ public Builder clearFormattedText() {
*
* * [Markup
* syntax](https://developers.google.com/workspace/chat/format-messages)
- * for bold, italic, strikethrough, monospace, monospace block, and bulleted
- * list.
+ * for bold, italic, strikethrough, monospace, monospace block, bulleted
+ * list, and block quote.
*
* * [User
* mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention)
@@ -7954,8 +7954,8 @@ public java.util.List
- * Output only. A URL in `spaces.messages.text` that matches a link preview
- * pattern. For more information, see [Preview
+ * Output only. A URL in the Chat message `text` field that matches a link
+ * preview pattern. For more information, see [Preview
* links](https://developers.google.com/workspace/chat/preview-links).
*
*
@@ -7973,8 +7973,8 @@ public boolean hasMatchedUrl() {
*
*
*
- * Output only. A URL in `spaces.messages.text` that matches a link preview
- * pattern. For more information, see [Preview
+ * Output only. A URL in the Chat message `text` field that matches a link
+ * preview pattern. For more information, see [Preview
* links](https://developers.google.com/workspace/chat/preview-links).
*
*
@@ -7998,8 +7998,8 @@ public com.google.chat.v1.MatchedUrl getMatchedUrl() {
*
*
*
- * Output only. A URL in `spaces.messages.text` that matches a link preview
- * pattern. For more information, see [Preview
+ * Output only. A URL in the Chat message `text` field that matches a link
+ * preview pattern. For more information, see [Preview
* links](https://developers.google.com/workspace/chat/preview-links).
*
*
@@ -8025,8 +8025,8 @@ public Builder setMatchedUrl(com.google.chat.v1.MatchedUrl value) {
*
*
*
- * Output only. A URL in `spaces.messages.text` that matches a link preview
- * pattern. For more information, see [Preview
+ * Output only. A URL in the Chat message `text` field that matches a link
+ * preview pattern. For more information, see [Preview
* links](https://developers.google.com/workspace/chat/preview-links).
*
*
@@ -8049,8 +8049,8 @@ public Builder setMatchedUrl(com.google.chat.v1.MatchedUrl.Builder builderForVal
*
*
*
- * Output only. A URL in `spaces.messages.text` that matches a link preview
- * pattern. For more information, see [Preview
+ * Output only. A URL in the Chat message `text` field that matches a link
+ * preview pattern. For more information, see [Preview
* links](https://developers.google.com/workspace/chat/preview-links).
*
*
@@ -8081,8 +8081,8 @@ public Builder mergeMatchedUrl(com.google.chat.v1.MatchedUrl value) {
*
*
*
- * Output only. A URL in `spaces.messages.text` that matches a link preview
- * pattern. For more information, see [Preview
+ * Output only. A URL in the Chat message `text` field that matches a link
+ * preview pattern. For more information, see [Preview
* links](https://developers.google.com/workspace/chat/preview-links).
*
*
@@ -8105,8 +8105,8 @@ public Builder clearMatchedUrl() {
*
*
*
- * Output only. A URL in `spaces.messages.text` that matches a link preview
- * pattern. For more information, see [Preview
+ * Output only. A URL in the Chat message `text` field that matches a link
+ * preview pattern. For more information, see [Preview
* links](https://developers.google.com/workspace/chat/preview-links).
*
*
@@ -8124,8 +8124,8 @@ public com.google.chat.v1.MatchedUrl.Builder getMatchedUrlBuilder() {
*
*
*
- * Output only. A URL in `spaces.messages.text` that matches a link preview
- * pattern. For more information, see [Preview
+ * Output only. A URL in the Chat message `text` field that matches a link
+ * preview pattern. For more information, see [Preview
* links](https://developers.google.com/workspace/chat/preview-links).
*
*
@@ -8147,8 +8147,8 @@ public com.google.chat.v1.MatchedUrlOrBuilder getMatchedUrlOrBuilder() {
*
*
*
- * Output only. A URL in `spaces.messages.text` that matches a link preview
- * pattern. For more information, see [Preview
+ * Output only. A URL in the Chat message `text` field that matches a link
+ * preview pattern. For more information, see [Preview
* links](https://developers.google.com/workspace/chat/preview-links).
*
*
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageOrBuilder.java
index 1f2919a39bcd..32b87c9a6932 100644
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageOrBuilder.java
+++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageOrBuilder.java
@@ -334,8 +334,8 @@ public interface MessageOrBuilder
*
* * [Markup
* syntax](https://developers.google.com/workspace/chat/format-messages)
- * for bold, italic, strikethrough, monospace, monospace block, and bulleted
- * list.
+ * for bold, italic, strikethrough, monospace, monospace block, bulleted
+ * list, and block quote.
*
* * [User
* mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention)
@@ -371,8 +371,8 @@ public interface MessageOrBuilder
*
* * [Markup
* syntax](https://developers.google.com/workspace/chat/format-messages)
- * for bold, italic, strikethrough, monospace, monospace block, and bulleted
- * list.
+ * for bold, italic, strikethrough, monospace, monospace block, bulleted
+ * list, and block quote.
*
* * [User
* mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention)
@@ -980,8 +980,8 @@ public interface MessageOrBuilder
*
*
*
- * Output only. A URL in `spaces.messages.text` that matches a link preview
- * pattern. For more information, see [Preview
+ * Output only. A URL in the Chat message `text` field that matches a link
+ * preview pattern. For more information, see [Preview
* links](https://developers.google.com/workspace/chat/preview-links).
*
*
@@ -996,8 +996,8 @@ public interface MessageOrBuilder
*
*
*
- * Output only. A URL in `spaces.messages.text` that matches a link preview
- * pattern. For more information, see [Preview
+ * Output only. A URL in the Chat message `text` field that matches a link
+ * preview pattern. For more information, see [Preview
* links](https://developers.google.com/workspace/chat/preview-links).
*
*
@@ -1012,8 +1012,8 @@ public interface MessageOrBuilder
*
*
*
- * Output only. A URL in `spaces.messages.text` that matches a link preview
- * pattern. For more information, see [Preview
+ * Output only. A URL in the Chat message `text` field that matches a link
+ * preview pattern. For more information, see [Preview
* links](https://developers.google.com/workspace/chat/preview-links).
*
*
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageProto.java
index 9bba0d3f8822..46c021ffb966 100644
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageProto.java
+++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageProto.java
@@ -120,6 +120,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_chat_v1_CardWithId_descriptor;
static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_google_chat_v1_CardWithId_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_chat_v1_SearchMessagesRequest_descriptor;
+ static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_google_chat_v1_SearchMessagesRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_chat_v1_SearchMessagesResponse_descriptor;
+ static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_google_chat_v1_SearchMessagesResponse_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_chat_v1_SearchMessageResult_descriptor;
+ static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_google_chat_v1_SearchMessageResult_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
return descriptor;
@@ -140,7 +152,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "&google/chat/v1/deletion_metadata.proto\032"
+ " google/chat/v1/matched_url.proto\032\035googl"
+ "e/chat/v1/reaction.proto\032\"google/chat/v1"
- + "/slash_command.proto\032\032google/chat/v1/space.proto\032\031google/chat/v1/user.proto\032"
+ + "/slash_command.proto\032\032google/chat/v1/spa"
+ + "ce.proto\032/google/chat/v1/space_notificat"
+ + "ion_setting.proto\032\031google/chat/v1/user.proto\032"
+ " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"\351\n\n"
+ "\007Message\022\021\n"
+ "\004name\030\001 \001(\tB\003\340A\010\022)\n"
@@ -192,18 +206,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\033chat.googleapis.com/Message\0229\n"
+ "\020last_update_time\030\002"
+ " \001(\0132\032.google.protobuf.TimestampB\003\340A\002\022H\n\n"
- + "quote_type\030\004 \001(\0162"
- + "/.google.chat.v1.QuotedMessageMetadata.QuoteTypeB\003\340A\001\022K\n"
+ + "quote_type\030\004"
+ + " \001(\0162/.google.chat.v1.QuotedMessageMetadata.QuoteTypeB\003\340A\001\022K\n"
+ "\027quoted_message_snapshot\030\005"
+ " \001(\0132%.google.chat.v1.QuotedMessageSnapshotB\003\340A\003\022B\n"
- + "\022forwarded_metadata\030\006 \001(\0132!"
- + ".google.chat.v1.ForwardedMetadataB\003\340A\003\"?\n"
+ + "\022forwarded_metadata\030\006"
+ + " \001(\0132!.google.chat.v1.ForwardedMetadataB\003\340A\003\"?\n"
+ "\tQuoteType\022\032\n"
+ "\026QUOTE_TYPE_UNSPECIFIED\020\000\022\t\n"
+ "\005REPLY\020\001\022\013\n"
+ "\007FORWARD\020\002:\201\001\352A~\n"
- + ")chat.googleapis.com/QuotedMessageMetadata\022Qspaces"
- + "/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata}\"\310\001\n"
+ + ")chat.googleapis.com/QuotedMessageMetadata\022Qspaces/{space}/messages/{message}/quo"
+ + "tedMessageMetadata/{quoted_message_metadata}\"\310\001\n"
+ "\025QuotedMessageSnapshot\022\023\n"
+ "\006sender\030\001 \001(\tB\003\340A\003\022\021\n"
+ "\004text\030\002 \001(\tB\003\340A\003\022\033\n"
@@ -254,8 +268,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\024UpdateMessageRequest\022-\n"
+ "\007message\030\001 \001(\0132\027.google.chat.v1.MessageB\003\340A\002\0224\n"
+ "\013update_mask\030\002"
- + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022\032\n"
- + "\r"
+ + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022\032\n\r"
+ "allow_missing\030\004 \001(\010B\003\340A\001\"\210\004\n"
+ "\024CreateMessageRequest\0223\n"
+ "\006parent\030\001 \001("
@@ -263,8 +276,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\007message\030\004 \001(\0132\027.google.chat.v1.MessageB\003\340A\002\022\031\n\n"
+ "thread_key\030\006 \001(\tB\005\030\001\340A\001\022\027\n\n"
+ "request_id\030\007 \001(\tB\003\340A\001\022Z\n"
- + "\024message_reply_option\030\010 \001(\01627.googl"
- + "e.chat.v1.CreateMessageRequest.MessageReplyOptionB\003\340A\001\022\027\n\n"
+ + "\024message_reply_option\030\010 \001("
+ + "\01627.google.chat.v1.CreateMessageRequest.MessageReplyOptionB\003\340A\001\022\027\n\n"
+ "message_id\030\t \001(\tB\003\340A\001\022b\n"
+ "#create_message_notification_options\030\n"
+ " \001(\01320.google.chat.v1.CreateMessageNotificationOptionsB\003\340A\001\"\177\n"
@@ -273,8 +286,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "$REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD\020\001\022\031\n"
+ "\025REPLY_MESSAGE_OR_FAIL\020\002\"\362\001\n"
+ " CreateMessageNotificationOptions\022\\\n"
- + "\021notification_type\030\001 \001(\0162A.google.chat.v1.CreateMess"
- + "ageNotificationOptions.NotificationType\"p\n"
+ + "\021notification_type\030\001 \001(\0162A.google.chat.v1.C"
+ + "reateMessageNotificationOptions.NotificationType\"p\n"
+ "\020NotificationType\022\032\n"
+ "\026NOTIFICATION_TYPE_NONE\020\000\022\"\n"
+ "\036NOTIFICATION_TYPE_FORCE_NOTIFY\020\002\022\034\n"
@@ -298,11 +311,32 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\004body\030\001 \001(\0132\031.google.apps.card.v1.CardB\003\340A\004\"F\n\n"
+ "CardWithId\022\017\n"
+ "\007card_id\030\001 \001(\t\022\'\n"
- + "\004card\030\002 \001(\0132\031.google.apps.card.v1.CardB\245\001\n"
- + "\022com.google.chat.v1B\014MessageProtoP\001Z,cloud.google.com/"
- + "go/chat/apiv1/chatpb;chatpb\242\002\013DYNAPIProt"
- + "o\252\002\023Google.Apps.Chat.V1\312\002\023Google\\Apps\\Ch"
- + "at\\V1\352\002\026Google::Apps::Chat::V1b\006proto3"
+ + "\004card\030\002 \001(\0132\031.google.apps.card.v1.Card\"\357\002\n"
+ + "\025SearchMessagesRequest\0221\n"
+ + "\006parent\030\001 \001(\tB!\340A\002\372A\033\n"
+ + "\031chat.googleapis.com/Space\022\023\n"
+ + "\006filter\030\002 \001(\tB\003\340A\002\022\026\n"
+ + "\tpage_size\030\003 \001(\005B\003\340A\001\022\027\n\n"
+ + "page_token\030\004 \001(\tB\003\340A\001\022\025\n"
+ + "\010order_by\030\005 \001(\tB\003\340A\001\022K\n"
+ + "\004view\030\007 \001(\01628.google.chat.v1.SearchM"
+ + "essagesRequest.SearchMessagesViewB\003\340A\001\"y\n"
+ + "\022SearchMessagesView\022$\n"
+ + " SEARCH_MESSAGES_VIEW_UNSPECIFIED\020\000\022\036\n"
+ + "\032SEARCH_MESSAGES_VIEW_BASIC\020\001\022\035\n"
+ + "\031SEARCH_MESSAGES_VIEW_FULL\020\002\"g\n"
+ + "\026SearchMessagesResponse\0224\n"
+ + "\007results\030\001 \003(\0132#.google.chat.v1.SearchMessageResult\022\027\n"
+ + "\017next_page_token\030\002 \001(\t\"\255\001\n"
+ + "\023SearchMessageResult\022(\n"
+ + "\007message\030\001 \001(\0132\027.google.chat.v1.Message\022\021\n"
+ + "\004read\030\003 \001(\010H\000\210\001\001\022P\n"
+ + "\022space_mute_setting\030\004"
+ + " \001(\01624.google.chat.v1.SpaceNotificationSetting.MuteSettingB\007\n"
+ + "\005_readB\245\001\n"
+ + "\022com.google.chat.v1B\014MessageProtoP\001Z,cloud.google.com/go/chat/apiv1/chatpb"
+ + ";chatpb\242\002\013DYNAPIProto\252\002\023Google.Apps.Chat"
+ + ".V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026Google::Apps::Chat::V1b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -320,6 +354,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
com.google.chat.v1.ReactionProto.getDescriptor(),
com.google.chat.v1.SlashCommandProto.getDescriptor(),
com.google.chat.v1.SpaceProto.getDescriptor(),
+ com.google.chat.v1.SpaceNotificationSettingProto.getDescriptor(),
com.google.chat.v1.UserProto.getDescriptor(),
com.google.protobuf.FieldMaskProto.getDescriptor(),
com.google.protobuf.TimestampProto.getDescriptor(),
@@ -506,6 +541,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new java.lang.String[] {
"CardId", "Card",
});
+ internal_static_google_chat_v1_SearchMessagesRequest_descriptor =
+ getDescriptor().getMessageType(18);
+ internal_static_google_chat_v1_SearchMessagesRequest_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_google_chat_v1_SearchMessagesRequest_descriptor,
+ new java.lang.String[] {
+ "Parent", "Filter", "PageSize", "PageToken", "OrderBy", "View",
+ });
+ internal_static_google_chat_v1_SearchMessagesResponse_descriptor =
+ getDescriptor().getMessageType(19);
+ internal_static_google_chat_v1_SearchMessagesResponse_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_google_chat_v1_SearchMessagesResponse_descriptor,
+ new java.lang.String[] {
+ "Results", "NextPageToken",
+ });
+ internal_static_google_chat_v1_SearchMessageResult_descriptor =
+ getDescriptor().getMessageType(20);
+ internal_static_google_chat_v1_SearchMessageResult_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_google_chat_v1_SearchMessageResult_descriptor,
+ new java.lang.String[] {
+ "Message", "Read", "SpaceMuteSetting",
+ });
descriptor.resolveAllFeaturesImmutable();
com.google.api.FieldBehaviorProto.getDescriptor();
com.google.api.ResourceProto.getDescriptor();
@@ -519,6 +578,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
com.google.chat.v1.ReactionProto.getDescriptor();
com.google.chat.v1.SlashCommandProto.getDescriptor();
com.google.chat.v1.SpaceProto.getDescriptor();
+ com.google.chat.v1.SpaceNotificationSettingProto.getDescriptor();
com.google.chat.v1.UserProto.getDescriptor();
com.google.protobuf.FieldMaskProto.getDescriptor();
com.google.protobuf.TimestampProto.getDescriptor();
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchMessageResult.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchMessageResult.java
new file mode 100644
index 000000000000..fa73b0d38814
--- /dev/null
+++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchMessageResult.java
@@ -0,0 +1,1085 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// NO CHECKED-IN PROTOBUF GENCODE
+// source: google/chat/v1/message.proto
+// Protobuf Java Version: 4.33.6
+
+package com.google.chat.v1;
+
+/**
+ *
+ *
+ *
+ * A single result item from a message search.
+ *
+ *
+ * Protobuf type {@code google.chat.v1.SearchMessageResult}
+ */
+@com.google.protobuf.Generated
+public final class SearchMessageResult extends com.google.protobuf.GeneratedMessage
+ implements
+ // @@protoc_insertion_point(message_implements:google.chat.v1.SearchMessageResult)
+ SearchMessageResultOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 33,
+ /* patch= */ 6,
+ /* suffix= */ "",
+ "SearchMessageResult");
+ }
+
+ // Use SearchMessageResult.newBuilder() to construct.
+ private SearchMessageResult(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ }
+
+ private SearchMessageResult() {
+ spaceMuteSetting_ = 0;
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.chat.v1.MessageProto
+ .internal_static_google_chat_v1_SearchMessageResult_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.chat.v1.MessageProto
+ .internal_static_google_chat_v1_SearchMessageResult_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.chat.v1.SearchMessageResult.class,
+ com.google.chat.v1.SearchMessageResult.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int MESSAGE_FIELD_NUMBER = 1;
+ private com.google.chat.v1.Message message_;
+
+ /**
+ *
+ *
+ *
+ * The matched message.
+ *
+ *
+ * .google.chat.v1.Message message = 1;
+ *
+ * @return Whether the message field is set.
+ */
+ @java.lang.Override
+ public boolean hasMessage() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ *
+ * The matched message.
+ *
+ *
+ * .google.chat.v1.Message message = 1;
+ *
+ * @return The message.
+ */
+ @java.lang.Override
+ public com.google.chat.v1.Message getMessage() {
+ return message_ == null ? com.google.chat.v1.Message.getDefaultInstance() : message_;
+ }
+
+ /**
+ *
+ *
+ *
+ * The matched message.
+ *
+ *
+ * .google.chat.v1.Message message = 1;
+ */
+ @java.lang.Override
+ public com.google.chat.v1.MessageOrBuilder getMessageOrBuilder() {
+ return message_ == null ? com.google.chat.v1.Message.getDefaultInstance() : message_;
+ }
+
+ public static final int READ_FIELD_NUMBER = 3;
+ private boolean read_ = false;
+
+ /**
+ *
+ *
+ *
+ * Indicates if the matched message is read by the calling user.
+ *
+ * Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
+ * calling credentials include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
+ * - `https://www.googleapis.com/auth/chat.users.readstate`
+ *
+ *
+ * optional bool read = 3;
+ *
+ * @return Whether the read field is set.
+ */
+ @java.lang.Override
+ public boolean hasRead() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates if the matched message is read by the calling user.
+ *
+ * Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
+ * calling credentials include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
+ * - `https://www.googleapis.com/auth/chat.users.readstate`
+ *
+ *
+ * optional bool read = 3;
+ *
+ * @return The read.
+ */
+ @java.lang.Override
+ public boolean getRead() {
+ return read_;
+ }
+
+ public static final int SPACE_MUTE_SETTING_FIELD_NUMBER = 4;
+ private int spaceMuteSetting_ = 0;
+
+ /**
+ *
+ *
+ *
+ * The mute setting of the calling user for the space where the message is
+ * posted. The caller app can use this information to decide how to process
+ * the message depending on whether the space is muted for the user or not.
+ *
+ * Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
+ * calling credentials include the following [authorization
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.spacesettings`
+ *
+ *
+ * .google.chat.v1.SpaceNotificationSetting.MuteSetting space_mute_setting = 4;
+ *
+ * @return The enum numeric value on the wire for spaceMuteSetting.
+ */
+ @java.lang.Override
+ public int getSpaceMuteSettingValue() {
+ return spaceMuteSetting_;
+ }
+
+ /**
+ *
+ *
+ *
+ * The mute setting of the calling user for the space where the message is
+ * posted. The caller app can use this information to decide how to process
+ * the message depending on whether the space is muted for the user or not.
+ *
+ * Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
+ * calling credentials include the following [authorization
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.spacesettings`
+ *
+ *
+ * .google.chat.v1.SpaceNotificationSetting.MuteSetting space_mute_setting = 4;
+ *
+ * @return The spaceMuteSetting.
+ */
+ @java.lang.Override
+ public com.google.chat.v1.SpaceNotificationSetting.MuteSetting getSpaceMuteSetting() {
+ com.google.chat.v1.SpaceNotificationSetting.MuteSetting result =
+ com.google.chat.v1.SpaceNotificationSetting.MuteSetting.forNumber(spaceMuteSetting_);
+ return result == null
+ ? com.google.chat.v1.SpaceNotificationSetting.MuteSetting.UNRECOGNIZED
+ : result;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(1, getMessage());
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeBool(3, read_);
+ }
+ if (spaceMuteSetting_
+ != com.google.chat.v1.SpaceNotificationSetting.MuteSetting.MUTE_SETTING_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(4, spaceMuteSetting_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMessage());
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, read_);
+ }
+ if (spaceMuteSetting_
+ != com.google.chat.v1.SpaceNotificationSetting.MuteSetting.MUTE_SETTING_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, spaceMuteSetting_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.chat.v1.SearchMessageResult)) {
+ return super.equals(obj);
+ }
+ com.google.chat.v1.SearchMessageResult other = (com.google.chat.v1.SearchMessageResult) obj;
+
+ if (hasMessage() != other.hasMessage()) return false;
+ if (hasMessage()) {
+ if (!getMessage().equals(other.getMessage())) return false;
+ }
+ if (hasRead() != other.hasRead()) return false;
+ if (hasRead()) {
+ if (getRead() != other.getRead()) return false;
+ }
+ if (spaceMuteSetting_ != other.spaceMuteSetting_) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasMessage()) {
+ hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
+ hash = (53 * hash) + getMessage().hashCode();
+ }
+ if (hasRead()) {
+ hash = (37 * hash) + READ_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRead());
+ }
+ hash = (37 * hash) + SPACE_MUTE_SETTING_FIELD_NUMBER;
+ hash = (53 * hash) + spaceMuteSetting_;
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.chat.v1.SearchMessageResult parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.chat.v1.SearchMessageResult parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.chat.v1.SearchMessageResult parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.chat.v1.SearchMessageResult parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.chat.v1.SearchMessageResult parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.chat.v1.SearchMessageResult parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.chat.v1.SearchMessageResult parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.chat.v1.SearchMessageResult parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.chat.v1.SearchMessageResult parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.chat.v1.SearchMessageResult parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.chat.v1.SearchMessageResult parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.chat.v1.SearchMessageResult parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.chat.v1.SearchMessageResult prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ *
+ * A single result item from a message search.
+ *
+ *
+ * Protobuf type {@code google.chat.v1.SearchMessageResult}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder
+ * The matched message.
+ *
+ *
+ * .google.chat.v1.Message message = 1;
+ *
+ * @return Whether the message field is set.
+ */
+ public boolean hasMessage() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ *
+ * The matched message.
+ *
+ *
+ * .google.chat.v1.Message message = 1;
+ *
+ * @return The message.
+ */
+ public com.google.chat.v1.Message getMessage() {
+ if (messageBuilder_ == null) {
+ return message_ == null ? com.google.chat.v1.Message.getDefaultInstance() : message_;
+ } else {
+ return messageBuilder_.getMessage();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * The matched message.
+ *
+ *
+ * .google.chat.v1.Message message = 1;
+ */
+ public Builder setMessage(com.google.chat.v1.Message value) {
+ if (messageBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ message_ = value;
+ } else {
+ messageBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * The matched message.
+ *
+ *
+ * .google.chat.v1.Message message = 1;
+ */
+ public Builder setMessage(com.google.chat.v1.Message.Builder builderForValue) {
+ if (messageBuilder_ == null) {
+ message_ = builderForValue.build();
+ } else {
+ messageBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * The matched message.
+ *
+ *
+ * .google.chat.v1.Message message = 1;
+ */
+ public Builder mergeMessage(com.google.chat.v1.Message value) {
+ if (messageBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)
+ && message_ != null
+ && message_ != com.google.chat.v1.Message.getDefaultInstance()) {
+ getMessageBuilder().mergeFrom(value);
+ } else {
+ message_ = value;
+ }
+ } else {
+ messageBuilder_.mergeFrom(value);
+ }
+ if (message_ != null) {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * The matched message.
+ *
+ *
+ * .google.chat.v1.Message message = 1;
+ */
+ public Builder clearMessage() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ message_ = null;
+ if (messageBuilder_ != null) {
+ messageBuilder_.dispose();
+ messageBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * The matched message.
+ *
+ *
+ * .google.chat.v1.Message message = 1;
+ */
+ public com.google.chat.v1.Message.Builder getMessageBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return internalGetMessageFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ *
+ * The matched message.
+ *
+ *
+ * .google.chat.v1.Message message = 1;
+ */
+ public com.google.chat.v1.MessageOrBuilder getMessageOrBuilder() {
+ if (messageBuilder_ != null) {
+ return messageBuilder_.getMessageOrBuilder();
+ } else {
+ return message_ == null ? com.google.chat.v1.Message.getDefaultInstance() : message_;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * The matched message.
+ *
+ *
+ * .google.chat.v1.Message message = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.chat.v1.Message,
+ com.google.chat.v1.Message.Builder,
+ com.google.chat.v1.MessageOrBuilder>
+ internalGetMessageFieldBuilder() {
+ if (messageBuilder_ == null) {
+ messageBuilder_ =
+ new com.google.protobuf.SingleFieldBuilder<
+ com.google.chat.v1.Message,
+ com.google.chat.v1.Message.Builder,
+ com.google.chat.v1.MessageOrBuilder>(
+ getMessage(), getParentForChildren(), isClean());
+ message_ = null;
+ }
+ return messageBuilder_;
+ }
+
+ private boolean read_;
+
+ /**
+ *
+ *
+ *
+ * Indicates if the matched message is read by the calling user.
+ *
+ * Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
+ * calling credentials include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
+ * - `https://www.googleapis.com/auth/chat.users.readstate`
+ *
+ *
+ * optional bool read = 3;
+ *
+ * @return Whether the read field is set.
+ */
+ @java.lang.Override
+ public boolean hasRead() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates if the matched message is read by the calling user.
+ *
+ * Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
+ * calling credentials include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
+ * - `https://www.googleapis.com/auth/chat.users.readstate`
+ *
+ *
+ * optional bool read = 3;
+ *
+ * @return The read.
+ */
+ @java.lang.Override
+ public boolean getRead() {
+ return read_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates if the matched message is read by the calling user.
+ *
+ * Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
+ * calling credentials include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
+ * - `https://www.googleapis.com/auth/chat.users.readstate`
+ *
+ *
+ * optional bool read = 3;
+ *
+ * @param value The read to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRead(boolean value) {
+
+ read_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Indicates if the matched message is read by the calling user.
+ *
+ * Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
+ * calling credentials include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
+ * - `https://www.googleapis.com/auth/chat.users.readstate`
+ *
+ *
+ * optional bool read = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRead() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ read_ = false;
+ onChanged();
+ return this;
+ }
+
+ private int spaceMuteSetting_ = 0;
+
+ /**
+ *
+ *
+ *
+ * The mute setting of the calling user for the space where the message is
+ * posted. The caller app can use this information to decide how to process
+ * the message depending on whether the space is muted for the user or not.
+ *
+ * Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
+ * calling credentials include the following [authorization
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.spacesettings`
+ *
+ *
+ * .google.chat.v1.SpaceNotificationSetting.MuteSetting space_mute_setting = 4;
+ *
+ * @return The enum numeric value on the wire for spaceMuteSetting.
+ */
+ @java.lang.Override
+ public int getSpaceMuteSettingValue() {
+ return spaceMuteSetting_;
+ }
+
+ /**
+ *
+ *
+ *
+ * The mute setting of the calling user for the space where the message is
+ * posted. The caller app can use this information to decide how to process
+ * the message depending on whether the space is muted for the user or not.
+ *
+ * Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
+ * calling credentials include the following [authorization
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.spacesettings`
+ *
+ *
+ * .google.chat.v1.SpaceNotificationSetting.MuteSetting space_mute_setting = 4;
+ *
+ * @param value The enum numeric value on the wire for spaceMuteSetting to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSpaceMuteSettingValue(int value) {
+ spaceMuteSetting_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * The mute setting of the calling user for the space where the message is
+ * posted. The caller app can use this information to decide how to process
+ * the message depending on whether the space is muted for the user or not.
+ *
+ * Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
+ * calling credentials include the following [authorization
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.spacesettings`
+ *
+ *
+ * .google.chat.v1.SpaceNotificationSetting.MuteSetting space_mute_setting = 4;
+ *
+ * @return The spaceMuteSetting.
+ */
+ @java.lang.Override
+ public com.google.chat.v1.SpaceNotificationSetting.MuteSetting getSpaceMuteSetting() {
+ com.google.chat.v1.SpaceNotificationSetting.MuteSetting result =
+ com.google.chat.v1.SpaceNotificationSetting.MuteSetting.forNumber(spaceMuteSetting_);
+ return result == null
+ ? com.google.chat.v1.SpaceNotificationSetting.MuteSetting.UNRECOGNIZED
+ : result;
+ }
+
+ /**
+ *
+ *
+ *
+ * The mute setting of the calling user for the space where the message is
+ * posted. The caller app can use this information to decide how to process
+ * the message depending on whether the space is muted for the user or not.
+ *
+ * Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
+ * calling credentials include the following [authorization
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.spacesettings`
+ *
+ *
+ * .google.chat.v1.SpaceNotificationSetting.MuteSetting space_mute_setting = 4;
+ *
+ * @param value The spaceMuteSetting to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSpaceMuteSetting(
+ com.google.chat.v1.SpaceNotificationSetting.MuteSetting value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000004;
+ spaceMuteSetting_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * The mute setting of the calling user for the space where the message is
+ * posted. The caller app can use this information to decide how to process
+ * the message depending on whether the space is muted for the user or not.
+ *
+ * Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
+ * calling credentials include the following [authorization
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.spacesettings`
+ *
+ *
+ * .google.chat.v1.SpaceNotificationSetting.MuteSetting space_mute_setting = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearSpaceMuteSetting() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ spaceMuteSetting_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.chat.v1.SearchMessageResult)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.chat.v1.SearchMessageResult)
+ private static final com.google.chat.v1.SearchMessageResult DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.chat.v1.SearchMessageResult();
+ }
+
+ public static com.google.chat.v1.SearchMessageResult getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * The matched message.
+ *
+ *
+ * .google.chat.v1.Message message = 1;
+ *
+ * @return Whether the message field is set.
+ */
+ boolean hasMessage();
+
+ /**
+ *
+ *
+ *
+ * The matched message.
+ *
+ *
+ * .google.chat.v1.Message message = 1;
+ *
+ * @return The message.
+ */
+ com.google.chat.v1.Message getMessage();
+
+ /**
+ *
+ *
+ *
+ * The matched message.
+ *
+ *
+ * .google.chat.v1.Message message = 1;
+ */
+ com.google.chat.v1.MessageOrBuilder getMessageOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Indicates if the matched message is read by the calling user.
+ *
+ * Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
+ * calling credentials include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
+ * - `https://www.googleapis.com/auth/chat.users.readstate`
+ *
+ *
+ * optional bool read = 3;
+ *
+ * @return Whether the read field is set.
+ */
+ boolean hasRead();
+
+ /**
+ *
+ *
+ *
+ * Indicates if the matched message is read by the calling user.
+ *
+ * Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
+ * calling credentials include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
+ * - `https://www.googleapis.com/auth/chat.users.readstate`
+ *
+ *
+ * optional bool read = 3;
+ *
+ * @return The read.
+ */
+ boolean getRead();
+
+ /**
+ *
+ *
+ *
+ * The mute setting of the calling user for the space where the message is
+ * posted. The caller app can use this information to decide how to process
+ * the message depending on whether the space is muted for the user or not.
+ *
+ * Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
+ * calling credentials include the following [authorization
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.spacesettings`
+ *
+ *
+ * .google.chat.v1.SpaceNotificationSetting.MuteSetting space_mute_setting = 4;
+ *
+ * @return The enum numeric value on the wire for spaceMuteSetting.
+ */
+ int getSpaceMuteSettingValue();
+
+ /**
+ *
+ *
+ *
+ * The mute setting of the calling user for the space where the message is
+ * posted. The caller app can use this information to decide how to process
+ * the message depending on whether the space is muted for the user or not.
+ *
+ * Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
+ * calling credentials include the following [authorization
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.spacesettings`
+ *
+ *
+ * .google.chat.v1.SpaceNotificationSetting.MuteSetting space_mute_setting = 4;
+ *
+ * @return The spaceMuteSetting.
+ */
+ com.google.chat.v1.SpaceNotificationSetting.MuteSetting getSpaceMuteSetting();
+}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchMessagesRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchMessagesRequest.java
new file mode 100644
index 000000000000..0a46e12262a8
--- /dev/null
+++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchMessagesRequest.java
@@ -0,0 +1,2682 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// NO CHECKED-IN PROTOBUF GENCODE
+// source: google/chat/v1/message.proto
+// Protobuf Java Version: 4.33.6
+
+package com.google.chat.v1;
+
+/**
+ *
+ *
+ *
+ * Request message for searching messages.
+ *
+ *
+ * Protobuf type {@code google.chat.v1.SearchMessagesRequest}
+ */
+@com.google.protobuf.Generated
+public final class SearchMessagesRequest extends com.google.protobuf.GeneratedMessage
+ implements
+ // @@protoc_insertion_point(message_implements:google.chat.v1.SearchMessagesRequest)
+ SearchMessagesRequestOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 33,
+ /* patch= */ 6,
+ /* suffix= */ "",
+ "SearchMessagesRequest");
+ }
+
+ // Use SearchMessagesRequest.newBuilder() to construct.
+ private SearchMessagesRequest(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ }
+
+ private SearchMessagesRequest() {
+ parent_ = "";
+ filter_ = "";
+ pageToken_ = "";
+ orderBy_ = "";
+ view_ = 0;
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.chat.v1.MessageProto
+ .internal_static_google_chat_v1_SearchMessagesRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.chat.v1.MessageProto
+ .internal_static_google_chat_v1_SearchMessagesRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.chat.v1.SearchMessagesRequest.class,
+ com.google.chat.v1.SearchMessagesRequest.Builder.class);
+ }
+
+ /**
+ *
+ *
+ *
+ * The kinds of view that are supported for partial search results.
+ *
+ *
+ * Protobuf enum {@code google.chat.v1.SearchMessagesRequest.SearchMessagesView}
+ */
+ public enum SearchMessagesView implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ *
+ *
+ * The default / unset value.
+ * The API will default to the BASIC view.
+ *
+ *
+ * SEARCH_MESSAGES_VIEW_UNSPECIFIED = 0;
+ */
+ SEARCH_MESSAGES_VIEW_UNSPECIFIED(0),
+ /**
+ *
+ *
+ *
+ * Includes only the matched messages in the results, but no additional
+ * metadata. This is the default value.
+ *
+ *
+ * SEARCH_MESSAGES_VIEW_BASIC = 1;
+ */
+ SEARCH_MESSAGES_VIEW_BASIC(1),
+ /**
+ *
+ *
+ *
+ * Includes everything in the results: the matched messages and additional
+ * metadata.
+ *
+ *
+ * SEARCH_MESSAGES_VIEW_FULL = 2;
+ */
+ SEARCH_MESSAGES_VIEW_FULL(2),
+ UNRECOGNIZED(-1),
+ ;
+
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 33,
+ /* patch= */ 6,
+ /* suffix= */ "",
+ "SearchMessagesView");
+ }
+
+ /**
+ *
+ *
+ *
+ * The default / unset value.
+ * The API will default to the BASIC view.
+ *
+ *
+ * SEARCH_MESSAGES_VIEW_UNSPECIFIED = 0;
+ */
+ public static final int SEARCH_MESSAGES_VIEW_UNSPECIFIED_VALUE = 0;
+
+ /**
+ *
+ *
+ *
+ * Includes only the matched messages in the results, but no additional
+ * metadata. This is the default value.
+ *
+ *
+ * SEARCH_MESSAGES_VIEW_BASIC = 1;
+ */
+ public static final int SEARCH_MESSAGES_VIEW_BASIC_VALUE = 1;
+
+ /**
+ *
+ *
+ *
+ * Includes everything in the results: the matched messages and additional
+ * metadata.
+ *
+ *
+ * SEARCH_MESSAGES_VIEW_FULL = 2;
+ */
+ public static final int SEARCH_MESSAGES_VIEW_FULL_VALUE = 2;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static SearchMessagesView valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static SearchMessagesView forNumber(int value) {
+ switch (value) {
+ case 0:
+ return SEARCH_MESSAGES_VIEW_UNSPECIFIED;
+ case 1:
+ return SEARCH_MESSAGES_VIEW_BASIC;
+ case 2:
+ return SEARCH_MESSAGES_VIEW_FULL;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ * Required. The resource name of the space to search within.
+ *
+ * To search across all spaces the user has access to, set this field to
+ * `spaces/-`. Using any other value for `parent` results in an
+ * `INVALID_ARGUMENT` error.
+ *
+ * To limit the search to one or more spaces, use `space.name` or
+ * `space.display_name` in the `filter`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The parent.
+ */
+ @java.lang.Override
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the space to search within.
+ *
+ * To search across all spaces the user has access to, set this field to
+ * `spaces/-`. Using any other value for `parent` results in an
+ * `INVALID_ARGUMENT` error.
+ *
+ * To limit the search to one or more spaces, use `space.name` or
+ * `space.display_name` in the `filter`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for parent.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int FILTER_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object filter_ = "";
+
+ /**
+ *
+ *
+ *
+ * Required. A search query.
+ *
+ * The query can specify one or more search keywords, which are used to filter
+ * the results,
+ *
+ * You can also filter the results using the following message fields:
+ *
+ * - `create_time`: Accepts a timestamp in
+ * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the
+ * supported comparison operators are: `<` and `>=`.
+ * - `sender.name`: The resource name of the sender (`users/{user}`). Only
+ * supports `=`. You can use the e-mail as an alias for `{user}`. For
+ * example, `users/example@gmail.com`, where `example@gmail.com` is the
+ * e-mail of the Google Chat user.
+ * - `space.name`: The resource name of the space where the message is posted.
+ * (`spaces/{space}`). Only supports `=`. If this filter is not set, the
+ * search is performed across all direct messages and spaces the user has
+ * access to as a space member.
+ * - `space.display_name`: Supports the operator `:` (has) and filters spaces
+ * based on a partial match of their display name. Results are limited to
+ * the top five space matches. For example, `space.display_name:Project`
+ * searches for messages in the top five spaces that contain the word
+ * "Project" in their display names.
+ * - `attachment`: Supports the operator `:*` (has any) to check for the
+ * presence of attachments. If `attachment:*` is specified, only messages
+ * that have at least one attachment are returned.
+ * - `annotations.user_mentions.user.name`: The resource name of the mentioned
+ * user (`users/{user}`). Only supports `:` (has). For example:
+ * `annotations.user_mentions.user.name:"users/1234567890"` returns only
+ * messages that contain a mention to the specified user. Alternatively, the
+ * alias `me` can be used to filter for messages that mention the caller
+ * user, for example: `annotations.user_mentions.user.name:users/me`. You
+ * can also use the e-mail as an alias for `{user}`, for example,
+ * `users/example@gmail.com`.
+ *
+ * For advanced filtering, the following functions are also available:
+ *
+ * - `has_link()`: Returns only messages that have at least one hyperlink in
+ * the message text.
+ * - `is_unread()`: Filters out messages that have been read by the calling
+ * user.
+ *
+ * Using the `space.display_name` filter requires that the calling credentials
+ * include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.spaces.readonly`
+ * - `https://www.googleapis.com/auth/chat.spaces`
+ *
+ * Using the `is_unread()` filter requires that the calling credentials
+ * include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
+ * - `https://www.googleapis.com/auth/chat.users.readstate`
+ *
+ *
+ * Across different fields, only `AND` operators are supported. A valid
+ * example is `sender.name = "users/1234567890" AND is_unread()`. The word
+ * `AND` is optional and is implied if omitted. For example, `sender.name =
+ * "users/1234567890" is_unread()` is valid and is equivalent to the previous
+ * example. An invalid example is `sender.name = "users/1234567890" OR
+ * is_unread()` because `OR` is not supported between different fields.
+ *
+ * Among the same field:
+ *
+ * - `create_time` supports only `AND`, and can only be used to represent
+ * an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND
+ * create_time < "2023-01-01T00:00:00+00:00"`.
+ * - `sender.name` supports only the `OR` operator, for example:
+ * `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`.
+ * - `space.name` supports only the `OR` operator, for example:
+ * `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`.
+ * - `space.display_name` supports the operators `AND` and `OR`, but not a
+ * mix of both. For example:
+ * `space.display_name:Project AND space.display_name:Tasks` returns
+ * messages that are in spaces with display names containing both `Project`
+ * and `Tasks`, whereas
+ * `space.display_name:Project OR space.display_name:Tasks` returns messages
+ * that are in spaces with display names containing either `Project` or
+ * `Tasks` or both.
+ * - `annotations.user_mentions.user.name` supports the operators `AND` and
+ * `OR`, but not a mix of both. For example:
+ * `annotations.user_mentions.user.name:"users/1234567890" AND
+ * annotations.user_mentions.user.name:"users/0987654321"` returns only
+ * messages that mentions both users, whereas
+ * `annotations.user_mentions.user.name:"users/1234567890" OR
+ * annotations.user_mentions.user.name:"users/0987654321"` returns messages
+ * that mention either user or both.
+ *
+ * Parentheses are required to disambiguate operator precedence when combining
+ * `AND` and `OR` operators in the same query. For example:
+ * `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`.
+ * Otherwise, parentheses are optional.
+ *
+ * The following example queries are valid:
+ *
+ * ```
+ * "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
+ *
+ * sender.name = "users/example@gmail.com"
+ *
+ * annotations.user_mentions.user.name:"users/0987654321"
+ *
+ * attachment:* AND space.name = "spaces/ABCDEFGH"
+ *
+ * tasks AND is_unread() AND sender.name = "users/1234567890"
+ *
+ * "things to do" "urgent"
+ *
+ * (sender.name = "users/1234567890")
+ * AND (create_time < "2023-05-01T00:00:00Z")
+ *
+ * tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
+ *
+ * "project one" is_unread()
+ *
+ * space.display_name:Project tasks
+ * ```
+ *
+ * The maximum query length is 1,000 characters.
+ *
+ * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
+ * error.
+ *
+ *
+ * string filter = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The filter.
+ */
+ @java.lang.Override
+ public java.lang.String getFilter() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ filter_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. A search query.
+ *
+ * The query can specify one or more search keywords, which are used to filter
+ * the results,
+ *
+ * You can also filter the results using the following message fields:
+ *
+ * - `create_time`: Accepts a timestamp in
+ * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the
+ * supported comparison operators are: `<` and `>=`.
+ * - `sender.name`: The resource name of the sender (`users/{user}`). Only
+ * supports `=`. You can use the e-mail as an alias for `{user}`. For
+ * example, `users/example@gmail.com`, where `example@gmail.com` is the
+ * e-mail of the Google Chat user.
+ * - `space.name`: The resource name of the space where the message is posted.
+ * (`spaces/{space}`). Only supports `=`. If this filter is not set, the
+ * search is performed across all direct messages and spaces the user has
+ * access to as a space member.
+ * - `space.display_name`: Supports the operator `:` (has) and filters spaces
+ * based on a partial match of their display name. Results are limited to
+ * the top five space matches. For example, `space.display_name:Project`
+ * searches for messages in the top five spaces that contain the word
+ * "Project" in their display names.
+ * - `attachment`: Supports the operator `:*` (has any) to check for the
+ * presence of attachments. If `attachment:*` is specified, only messages
+ * that have at least one attachment are returned.
+ * - `annotations.user_mentions.user.name`: The resource name of the mentioned
+ * user (`users/{user}`). Only supports `:` (has). For example:
+ * `annotations.user_mentions.user.name:"users/1234567890"` returns only
+ * messages that contain a mention to the specified user. Alternatively, the
+ * alias `me` can be used to filter for messages that mention the caller
+ * user, for example: `annotations.user_mentions.user.name:users/me`. You
+ * can also use the e-mail as an alias for `{user}`, for example,
+ * `users/example@gmail.com`.
+ *
+ * For advanced filtering, the following functions are also available:
+ *
+ * - `has_link()`: Returns only messages that have at least one hyperlink in
+ * the message text.
+ * - `is_unread()`: Filters out messages that have been read by the calling
+ * user.
+ *
+ * Using the `space.display_name` filter requires that the calling credentials
+ * include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.spaces.readonly`
+ * - `https://www.googleapis.com/auth/chat.spaces`
+ *
+ * Using the `is_unread()` filter requires that the calling credentials
+ * include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
+ * - `https://www.googleapis.com/auth/chat.users.readstate`
+ *
+ *
+ * Across different fields, only `AND` operators are supported. A valid
+ * example is `sender.name = "users/1234567890" AND is_unread()`. The word
+ * `AND` is optional and is implied if omitted. For example, `sender.name =
+ * "users/1234567890" is_unread()` is valid and is equivalent to the previous
+ * example. An invalid example is `sender.name = "users/1234567890" OR
+ * is_unread()` because `OR` is not supported between different fields.
+ *
+ * Among the same field:
+ *
+ * - `create_time` supports only `AND`, and can only be used to represent
+ * an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND
+ * create_time < "2023-01-01T00:00:00+00:00"`.
+ * - `sender.name` supports only the `OR` operator, for example:
+ * `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`.
+ * - `space.name` supports only the `OR` operator, for example:
+ * `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`.
+ * - `space.display_name` supports the operators `AND` and `OR`, but not a
+ * mix of both. For example:
+ * `space.display_name:Project AND space.display_name:Tasks` returns
+ * messages that are in spaces with display names containing both `Project`
+ * and `Tasks`, whereas
+ * `space.display_name:Project OR space.display_name:Tasks` returns messages
+ * that are in spaces with display names containing either `Project` or
+ * `Tasks` or both.
+ * - `annotations.user_mentions.user.name` supports the operators `AND` and
+ * `OR`, but not a mix of both. For example:
+ * `annotations.user_mentions.user.name:"users/1234567890" AND
+ * annotations.user_mentions.user.name:"users/0987654321"` returns only
+ * messages that mentions both users, whereas
+ * `annotations.user_mentions.user.name:"users/1234567890" OR
+ * annotations.user_mentions.user.name:"users/0987654321"` returns messages
+ * that mention either user or both.
+ *
+ * Parentheses are required to disambiguate operator precedence when combining
+ * `AND` and `OR` operators in the same query. For example:
+ * `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`.
+ * Otherwise, parentheses are optional.
+ *
+ * The following example queries are valid:
+ *
+ * ```
+ * "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
+ *
+ * sender.name = "users/example@gmail.com"
+ *
+ * annotations.user_mentions.user.name:"users/0987654321"
+ *
+ * attachment:* AND space.name = "spaces/ABCDEFGH"
+ *
+ * tasks AND is_unread() AND sender.name = "users/1234567890"
+ *
+ * "things to do" "urgent"
+ *
+ * (sender.name = "users/1234567890")
+ * AND (create_time < "2023-05-01T00:00:00Z")
+ *
+ * tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
+ *
+ * "project one" is_unread()
+ *
+ * space.display_name:Project tasks
+ * ```
+ *
+ * The maximum query length is 1,000 characters.
+ *
+ * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
+ * error.
+ *
+ *
+ * string filter = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for filter.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getFilterBytes() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ filter_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PAGE_SIZE_FIELD_NUMBER = 3;
+ private int pageSize_ = 0;
+
+ /**
+ *
+ *
+ *
+ * Optional. The maximum number of results to return. The service may return
+ * fewer than this value.
+ *
+ * If unspecified, at most 25 are returned.
+ *
+ * The maximum value is 100. If you use a value more than 100, it's
+ * automatically changed to 100.
+ *
+ *
+ * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageSize.
+ */
+ @java.lang.Override
+ public int getPageSize() {
+ return pageSize_;
+ }
+
+ public static final int PAGE_TOKEN_FIELD_NUMBER = 4;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object pageToken_ = "";
+
+ /**
+ *
+ *
+ *
+ * Optional. A token, received from the previous search messages call. Provide
+ * this parameter to retrieve the subsequent page.
+ *
+ * When paginating, all other parameters provided should match the call that
+ * provided the page token. Passing different values to the other parameters
+ * might lead to unexpected results.
+ *
+ *
+ * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageToken.
+ */
+ @java.lang.Override
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ pageToken_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. A token, received from the previous search messages call. Provide
+ * this parameter to retrieve the subsequent page.
+ *
+ * When paginating, all other parameters provided should match the call that
+ * provided the page token. Passing different values to the other parameters
+ * might lead to unexpected results.
+ *
+ *
+ * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for pageToken.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ORDER_BY_FIELD_NUMBER = 5;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object orderBy_ = "";
+
+ /**
+ *
+ *
+ *
+ * Optional. How the results list is ordered.
+ *
+ * Supported attributes to order by are:
+ *
+ * - `create_time`: Sorts the results by the time of the message creation.
+ * Default value.
+ * - `relevance`: Sorts the results by relevance.
+ * [Developer Preview](https://developers.google.com/workspace/preview).
+ *
+ * The default ordering is `create_time desc`. Only a single order per query
+ * (`create_time` or `relevance`) is supported. Only descending order (`desc`)
+ * is supported, and it must be specified after the order attribute.
+ *
+ *
+ * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The orderBy.
+ */
+ @java.lang.Override
+ public java.lang.String getOrderBy() {
+ java.lang.Object ref = orderBy_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ orderBy_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. How the results list is ordered.
+ *
+ * Supported attributes to order by are:
+ *
+ * - `create_time`: Sorts the results by the time of the message creation.
+ * Default value.
+ * - `relevance`: Sorts the results by relevance.
+ * [Developer Preview](https://developers.google.com/workspace/preview).
+ *
+ * The default ordering is `create_time desc`. Only a single order per query
+ * (`create_time` or `relevance`) is supported. Only descending order (`desc`)
+ * is supported, and it must be specified after the order attribute.
+ *
+ *
+ * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for orderBy.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getOrderByBytes() {
+ java.lang.Object ref = orderBy_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ orderBy_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int VIEW_FIELD_NUMBER = 7;
+ private int view_ = 0;
+
+ /**
+ *
+ *
+ *
+ * Optional. Specifies what kind of search results view to return. The default
+ * is `SEARCH_MESSAGES_VIEW_BASIC`.
+ *
+ *
+ *
+ * .google.chat.v1.SearchMessagesRequest.SearchMessagesView view = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The enum numeric value on the wire for view.
+ */
+ @java.lang.Override
+ public int getViewValue() {
+ return view_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Specifies what kind of search results view to return. The default
+ * is `SEARCH_MESSAGES_VIEW_BASIC`.
+ *
+ *
+ *
+ * .google.chat.v1.SearchMessagesRequest.SearchMessagesView view = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The view.
+ */
+ @java.lang.Override
+ public com.google.chat.v1.SearchMessagesRequest.SearchMessagesView getView() {
+ com.google.chat.v1.SearchMessagesRequest.SearchMessagesView result =
+ com.google.chat.v1.SearchMessagesRequest.SearchMessagesView.forNumber(view_);
+ return result == null
+ ? com.google.chat.v1.SearchMessagesRequest.SearchMessagesView.UNRECOGNIZED
+ : result;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_);
+ }
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 2, filter_);
+ }
+ if (pageSize_ != 0) {
+ output.writeInt32(3, pageSize_);
+ }
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 4, pageToken_);
+ }
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 5, orderBy_);
+ }
+ if (view_
+ != com.google.chat.v1.SearchMessagesRequest.SearchMessagesView
+ .SEARCH_MESSAGES_VIEW_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(7, view_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_);
+ }
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(2, filter_);
+ }
+ if (pageSize_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_);
+ }
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(4, pageToken_);
+ }
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(orderBy_)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(5, orderBy_);
+ }
+ if (view_
+ != com.google.chat.v1.SearchMessagesRequest.SearchMessagesView
+ .SEARCH_MESSAGES_VIEW_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, view_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.chat.v1.SearchMessagesRequest)) {
+ return super.equals(obj);
+ }
+ com.google.chat.v1.SearchMessagesRequest other = (com.google.chat.v1.SearchMessagesRequest) obj;
+
+ if (!getParent().equals(other.getParent())) return false;
+ if (!getFilter().equals(other.getFilter())) return false;
+ if (getPageSize() != other.getPageSize()) return false;
+ if (!getPageToken().equals(other.getPageToken())) return false;
+ if (!getOrderBy().equals(other.getOrderBy())) return false;
+ if (view_ != other.view_) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + PARENT_FIELD_NUMBER;
+ hash = (53 * hash) + getParent().hashCode();
+ hash = (37 * hash) + FILTER_FIELD_NUMBER;
+ hash = (53 * hash) + getFilter().hashCode();
+ hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER;
+ hash = (53 * hash) + getPageSize();
+ hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getPageToken().hashCode();
+ hash = (37 * hash) + ORDER_BY_FIELD_NUMBER;
+ hash = (53 * hash) + getOrderBy().hashCode();
+ hash = (37 * hash) + VIEW_FIELD_NUMBER;
+ hash = (53 * hash) + view_;
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.chat.v1.SearchMessagesRequest parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.chat.v1.SearchMessagesRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.chat.v1.SearchMessagesRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.chat.v1.SearchMessagesRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.chat.v1.SearchMessagesRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.chat.v1.SearchMessagesRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.chat.v1.SearchMessagesRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.chat.v1.SearchMessagesRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.chat.v1.SearchMessagesRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.chat.v1.SearchMessagesRequest parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.chat.v1.SearchMessagesRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.chat.v1.SearchMessagesRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.chat.v1.SearchMessagesRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ *
+ * Request message for searching messages.
+ *
+ *
+ * Protobuf type {@code google.chat.v1.SearchMessagesRequest}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder
+ * Required. The resource name of the space to search within.
+ *
+ * To search across all spaces the user has access to, set this field to
+ * `spaces/-`. Using any other value for `parent` results in an
+ * `INVALID_ARGUMENT` error.
+ *
+ * To limit the search to one or more spaces, use `space.name` or
+ * `space.display_name` in the `filter`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The parent.
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the space to search within.
+ *
+ * To search across all spaces the user has access to, set this field to
+ * `spaces/-`. Using any other value for `parent` results in an
+ * `INVALID_ARGUMENT` error.
+ *
+ * To limit the search to one or more spaces, use `space.name` or
+ * `space.display_name` in the `filter`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for parent.
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the space to search within.
+ *
+ * To search across all spaces the user has access to, set this field to
+ * `spaces/-`. Using any other value for `parent` results in an
+ * `INVALID_ARGUMENT` error.
+ *
+ * To limit the search to one or more spaces, use `space.name` or
+ * `space.display_name` in the `filter`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ parent_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the space to search within.
+ *
+ * To search across all spaces the user has access to, set this field to
+ * `spaces/-`. Using any other value for `parent` results in an
+ * `INVALID_ARGUMENT` error.
+ *
+ * To limit the search to one or more spaces, use `space.name` or
+ * `space.display_name` in the `filter`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearParent() {
+ parent_ = getDefaultInstance().getParent();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the space to search within.
+ *
+ * To search across all spaces the user has access to, set this field to
+ * `spaces/-`. Using any other value for `parent` results in an
+ * `INVALID_ARGUMENT` error.
+ *
+ * To limit the search to one or more spaces, use `space.name` or
+ * `space.display_name` in the `filter`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The bytes for parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ parent_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object filter_ = "";
+
+ /**
+ *
+ *
+ *
+ * Required. A search query.
+ *
+ * The query can specify one or more search keywords, which are used to filter
+ * the results,
+ *
+ * You can also filter the results using the following message fields:
+ *
+ * - `create_time`: Accepts a timestamp in
+ * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the
+ * supported comparison operators are: `<` and `>=`.
+ * - `sender.name`: The resource name of the sender (`users/{user}`). Only
+ * supports `=`. You can use the e-mail as an alias for `{user}`. For
+ * example, `users/example@gmail.com`, where `example@gmail.com` is the
+ * e-mail of the Google Chat user.
+ * - `space.name`: The resource name of the space where the message is posted.
+ * (`spaces/{space}`). Only supports `=`. If this filter is not set, the
+ * search is performed across all direct messages and spaces the user has
+ * access to as a space member.
+ * - `space.display_name`: Supports the operator `:` (has) and filters spaces
+ * based on a partial match of their display name. Results are limited to
+ * the top five space matches. For example, `space.display_name:Project`
+ * searches for messages in the top five spaces that contain the word
+ * "Project" in their display names.
+ * - `attachment`: Supports the operator `:*` (has any) to check for the
+ * presence of attachments. If `attachment:*` is specified, only messages
+ * that have at least one attachment are returned.
+ * - `annotations.user_mentions.user.name`: The resource name of the mentioned
+ * user (`users/{user}`). Only supports `:` (has). For example:
+ * `annotations.user_mentions.user.name:"users/1234567890"` returns only
+ * messages that contain a mention to the specified user. Alternatively, the
+ * alias `me` can be used to filter for messages that mention the caller
+ * user, for example: `annotations.user_mentions.user.name:users/me`. You
+ * can also use the e-mail as an alias for `{user}`, for example,
+ * `users/example@gmail.com`.
+ *
+ * For advanced filtering, the following functions are also available:
+ *
+ * - `has_link()`: Returns only messages that have at least one hyperlink in
+ * the message text.
+ * - `is_unread()`: Filters out messages that have been read by the calling
+ * user.
+ *
+ * Using the `space.display_name` filter requires that the calling credentials
+ * include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.spaces.readonly`
+ * - `https://www.googleapis.com/auth/chat.spaces`
+ *
+ * Using the `is_unread()` filter requires that the calling credentials
+ * include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
+ * - `https://www.googleapis.com/auth/chat.users.readstate`
+ *
+ *
+ * Across different fields, only `AND` operators are supported. A valid
+ * example is `sender.name = "users/1234567890" AND is_unread()`. The word
+ * `AND` is optional and is implied if omitted. For example, `sender.name =
+ * "users/1234567890" is_unread()` is valid and is equivalent to the previous
+ * example. An invalid example is `sender.name = "users/1234567890" OR
+ * is_unread()` because `OR` is not supported between different fields.
+ *
+ * Among the same field:
+ *
+ * - `create_time` supports only `AND`, and can only be used to represent
+ * an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND
+ * create_time < "2023-01-01T00:00:00+00:00"`.
+ * - `sender.name` supports only the `OR` operator, for example:
+ * `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`.
+ * - `space.name` supports only the `OR` operator, for example:
+ * `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`.
+ * - `space.display_name` supports the operators `AND` and `OR`, but not a
+ * mix of both. For example:
+ * `space.display_name:Project AND space.display_name:Tasks` returns
+ * messages that are in spaces with display names containing both `Project`
+ * and `Tasks`, whereas
+ * `space.display_name:Project OR space.display_name:Tasks` returns messages
+ * that are in spaces with display names containing either `Project` or
+ * `Tasks` or both.
+ * - `annotations.user_mentions.user.name` supports the operators `AND` and
+ * `OR`, but not a mix of both. For example:
+ * `annotations.user_mentions.user.name:"users/1234567890" AND
+ * annotations.user_mentions.user.name:"users/0987654321"` returns only
+ * messages that mentions both users, whereas
+ * `annotations.user_mentions.user.name:"users/1234567890" OR
+ * annotations.user_mentions.user.name:"users/0987654321"` returns messages
+ * that mention either user or both.
+ *
+ * Parentheses are required to disambiguate operator precedence when combining
+ * `AND` and `OR` operators in the same query. For example:
+ * `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`.
+ * Otherwise, parentheses are optional.
+ *
+ * The following example queries are valid:
+ *
+ * ```
+ * "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
+ *
+ * sender.name = "users/example@gmail.com"
+ *
+ * annotations.user_mentions.user.name:"users/0987654321"
+ *
+ * attachment:* AND space.name = "spaces/ABCDEFGH"
+ *
+ * tasks AND is_unread() AND sender.name = "users/1234567890"
+ *
+ * "things to do" "urgent"
+ *
+ * (sender.name = "users/1234567890")
+ * AND (create_time < "2023-05-01T00:00:00Z")
+ *
+ * tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
+ *
+ * "project one" is_unread()
+ *
+ * space.display_name:Project tasks
+ * ```
+ *
+ * The maximum query length is 1,000 characters.
+ *
+ * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
+ * error.
+ *
+ *
+ * string filter = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The filter.
+ */
+ public java.lang.String getFilter() {
+ java.lang.Object ref = filter_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ filter_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. A search query.
+ *
+ * The query can specify one or more search keywords, which are used to filter
+ * the results,
+ *
+ * You can also filter the results using the following message fields:
+ *
+ * - `create_time`: Accepts a timestamp in
+ * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the
+ * supported comparison operators are: `<` and `>=`.
+ * - `sender.name`: The resource name of the sender (`users/{user}`). Only
+ * supports `=`. You can use the e-mail as an alias for `{user}`. For
+ * example, `users/example@gmail.com`, where `example@gmail.com` is the
+ * e-mail of the Google Chat user.
+ * - `space.name`: The resource name of the space where the message is posted.
+ * (`spaces/{space}`). Only supports `=`. If this filter is not set, the
+ * search is performed across all direct messages and spaces the user has
+ * access to as a space member.
+ * - `space.display_name`: Supports the operator `:` (has) and filters spaces
+ * based on a partial match of their display name. Results are limited to
+ * the top five space matches. For example, `space.display_name:Project`
+ * searches for messages in the top five spaces that contain the word
+ * "Project" in their display names.
+ * - `attachment`: Supports the operator `:*` (has any) to check for the
+ * presence of attachments. If `attachment:*` is specified, only messages
+ * that have at least one attachment are returned.
+ * - `annotations.user_mentions.user.name`: The resource name of the mentioned
+ * user (`users/{user}`). Only supports `:` (has). For example:
+ * `annotations.user_mentions.user.name:"users/1234567890"` returns only
+ * messages that contain a mention to the specified user. Alternatively, the
+ * alias `me` can be used to filter for messages that mention the caller
+ * user, for example: `annotations.user_mentions.user.name:users/me`. You
+ * can also use the e-mail as an alias for `{user}`, for example,
+ * `users/example@gmail.com`.
+ *
+ * For advanced filtering, the following functions are also available:
+ *
+ * - `has_link()`: Returns only messages that have at least one hyperlink in
+ * the message text.
+ * - `is_unread()`: Filters out messages that have been read by the calling
+ * user.
+ *
+ * Using the `space.display_name` filter requires that the calling credentials
+ * include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.spaces.readonly`
+ * - `https://www.googleapis.com/auth/chat.spaces`
+ *
+ * Using the `is_unread()` filter requires that the calling credentials
+ * include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
+ * - `https://www.googleapis.com/auth/chat.users.readstate`
+ *
+ *
+ * Across different fields, only `AND` operators are supported. A valid
+ * example is `sender.name = "users/1234567890" AND is_unread()`. The word
+ * `AND` is optional and is implied if omitted. For example, `sender.name =
+ * "users/1234567890" is_unread()` is valid and is equivalent to the previous
+ * example. An invalid example is `sender.name = "users/1234567890" OR
+ * is_unread()` because `OR` is not supported between different fields.
+ *
+ * Among the same field:
+ *
+ * - `create_time` supports only `AND`, and can only be used to represent
+ * an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND
+ * create_time < "2023-01-01T00:00:00+00:00"`.
+ * - `sender.name` supports only the `OR` operator, for example:
+ * `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`.
+ * - `space.name` supports only the `OR` operator, for example:
+ * `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`.
+ * - `space.display_name` supports the operators `AND` and `OR`, but not a
+ * mix of both. For example:
+ * `space.display_name:Project AND space.display_name:Tasks` returns
+ * messages that are in spaces with display names containing both `Project`
+ * and `Tasks`, whereas
+ * `space.display_name:Project OR space.display_name:Tasks` returns messages
+ * that are in spaces with display names containing either `Project` or
+ * `Tasks` or both.
+ * - `annotations.user_mentions.user.name` supports the operators `AND` and
+ * `OR`, but not a mix of both. For example:
+ * `annotations.user_mentions.user.name:"users/1234567890" AND
+ * annotations.user_mentions.user.name:"users/0987654321"` returns only
+ * messages that mentions both users, whereas
+ * `annotations.user_mentions.user.name:"users/1234567890" OR
+ * annotations.user_mentions.user.name:"users/0987654321"` returns messages
+ * that mention either user or both.
+ *
+ * Parentheses are required to disambiguate operator precedence when combining
+ * `AND` and `OR` operators in the same query. For example:
+ * `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`.
+ * Otherwise, parentheses are optional.
+ *
+ * The following example queries are valid:
+ *
+ * ```
+ * "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
+ *
+ * sender.name = "users/example@gmail.com"
+ *
+ * annotations.user_mentions.user.name:"users/0987654321"
+ *
+ * attachment:* AND space.name = "spaces/ABCDEFGH"
+ *
+ * tasks AND is_unread() AND sender.name = "users/1234567890"
+ *
+ * "things to do" "urgent"
+ *
+ * (sender.name = "users/1234567890")
+ * AND (create_time < "2023-05-01T00:00:00Z")
+ *
+ * tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
+ *
+ * "project one" is_unread()
+ *
+ * space.display_name:Project tasks
+ * ```
+ *
+ * The maximum query length is 1,000 characters.
+ *
+ * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
+ * error.
+ *
+ *
+ * string filter = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for filter.
+ */
+ public com.google.protobuf.ByteString getFilterBytes() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ filter_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. A search query.
+ *
+ * The query can specify one or more search keywords, which are used to filter
+ * the results,
+ *
+ * You can also filter the results using the following message fields:
+ *
+ * - `create_time`: Accepts a timestamp in
+ * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the
+ * supported comparison operators are: `<` and `>=`.
+ * - `sender.name`: The resource name of the sender (`users/{user}`). Only
+ * supports `=`. You can use the e-mail as an alias for `{user}`. For
+ * example, `users/example@gmail.com`, where `example@gmail.com` is the
+ * e-mail of the Google Chat user.
+ * - `space.name`: The resource name of the space where the message is posted.
+ * (`spaces/{space}`). Only supports `=`. If this filter is not set, the
+ * search is performed across all direct messages and spaces the user has
+ * access to as a space member.
+ * - `space.display_name`: Supports the operator `:` (has) and filters spaces
+ * based on a partial match of their display name. Results are limited to
+ * the top five space matches. For example, `space.display_name:Project`
+ * searches for messages in the top five spaces that contain the word
+ * "Project" in their display names.
+ * - `attachment`: Supports the operator `:*` (has any) to check for the
+ * presence of attachments. If `attachment:*` is specified, only messages
+ * that have at least one attachment are returned.
+ * - `annotations.user_mentions.user.name`: The resource name of the mentioned
+ * user (`users/{user}`). Only supports `:` (has). For example:
+ * `annotations.user_mentions.user.name:"users/1234567890"` returns only
+ * messages that contain a mention to the specified user. Alternatively, the
+ * alias `me` can be used to filter for messages that mention the caller
+ * user, for example: `annotations.user_mentions.user.name:users/me`. You
+ * can also use the e-mail as an alias for `{user}`, for example,
+ * `users/example@gmail.com`.
+ *
+ * For advanced filtering, the following functions are also available:
+ *
+ * - `has_link()`: Returns only messages that have at least one hyperlink in
+ * the message text.
+ * - `is_unread()`: Filters out messages that have been read by the calling
+ * user.
+ *
+ * Using the `space.display_name` filter requires that the calling credentials
+ * include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.spaces.readonly`
+ * - `https://www.googleapis.com/auth/chat.spaces`
+ *
+ * Using the `is_unread()` filter requires that the calling credentials
+ * include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
+ * - `https://www.googleapis.com/auth/chat.users.readstate`
+ *
+ *
+ * Across different fields, only `AND` operators are supported. A valid
+ * example is `sender.name = "users/1234567890" AND is_unread()`. The word
+ * `AND` is optional and is implied if omitted. For example, `sender.name =
+ * "users/1234567890" is_unread()` is valid and is equivalent to the previous
+ * example. An invalid example is `sender.name = "users/1234567890" OR
+ * is_unread()` because `OR` is not supported between different fields.
+ *
+ * Among the same field:
+ *
+ * - `create_time` supports only `AND`, and can only be used to represent
+ * an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND
+ * create_time < "2023-01-01T00:00:00+00:00"`.
+ * - `sender.name` supports only the `OR` operator, for example:
+ * `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`.
+ * - `space.name` supports only the `OR` operator, for example:
+ * `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`.
+ * - `space.display_name` supports the operators `AND` and `OR`, but not a
+ * mix of both. For example:
+ * `space.display_name:Project AND space.display_name:Tasks` returns
+ * messages that are in spaces with display names containing both `Project`
+ * and `Tasks`, whereas
+ * `space.display_name:Project OR space.display_name:Tasks` returns messages
+ * that are in spaces with display names containing either `Project` or
+ * `Tasks` or both.
+ * - `annotations.user_mentions.user.name` supports the operators `AND` and
+ * `OR`, but not a mix of both. For example:
+ * `annotations.user_mentions.user.name:"users/1234567890" AND
+ * annotations.user_mentions.user.name:"users/0987654321"` returns only
+ * messages that mentions both users, whereas
+ * `annotations.user_mentions.user.name:"users/1234567890" OR
+ * annotations.user_mentions.user.name:"users/0987654321"` returns messages
+ * that mention either user or both.
+ *
+ * Parentheses are required to disambiguate operator precedence when combining
+ * `AND` and `OR` operators in the same query. For example:
+ * `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`.
+ * Otherwise, parentheses are optional.
+ *
+ * The following example queries are valid:
+ *
+ * ```
+ * "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
+ *
+ * sender.name = "users/example@gmail.com"
+ *
+ * annotations.user_mentions.user.name:"users/0987654321"
+ *
+ * attachment:* AND space.name = "spaces/ABCDEFGH"
+ *
+ * tasks AND is_unread() AND sender.name = "users/1234567890"
+ *
+ * "things to do" "urgent"
+ *
+ * (sender.name = "users/1234567890")
+ * AND (create_time < "2023-05-01T00:00:00Z")
+ *
+ * tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
+ *
+ * "project one" is_unread()
+ *
+ * space.display_name:Project tasks
+ * ```
+ *
+ * The maximum query length is 1,000 characters.
+ *
+ * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
+ * error.
+ *
+ *
+ * string filter = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The filter to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFilter(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ filter_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. A search query.
+ *
+ * The query can specify one or more search keywords, which are used to filter
+ * the results,
+ *
+ * You can also filter the results using the following message fields:
+ *
+ * - `create_time`: Accepts a timestamp in
+ * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the
+ * supported comparison operators are: `<` and `>=`.
+ * - `sender.name`: The resource name of the sender (`users/{user}`). Only
+ * supports `=`. You can use the e-mail as an alias for `{user}`. For
+ * example, `users/example@gmail.com`, where `example@gmail.com` is the
+ * e-mail of the Google Chat user.
+ * - `space.name`: The resource name of the space where the message is posted.
+ * (`spaces/{space}`). Only supports `=`. If this filter is not set, the
+ * search is performed across all direct messages and spaces the user has
+ * access to as a space member.
+ * - `space.display_name`: Supports the operator `:` (has) and filters spaces
+ * based on a partial match of their display name. Results are limited to
+ * the top five space matches. For example, `space.display_name:Project`
+ * searches for messages in the top five spaces that contain the word
+ * "Project" in their display names.
+ * - `attachment`: Supports the operator `:*` (has any) to check for the
+ * presence of attachments. If `attachment:*` is specified, only messages
+ * that have at least one attachment are returned.
+ * - `annotations.user_mentions.user.name`: The resource name of the mentioned
+ * user (`users/{user}`). Only supports `:` (has). For example:
+ * `annotations.user_mentions.user.name:"users/1234567890"` returns only
+ * messages that contain a mention to the specified user. Alternatively, the
+ * alias `me` can be used to filter for messages that mention the caller
+ * user, for example: `annotations.user_mentions.user.name:users/me`. You
+ * can also use the e-mail as an alias for `{user}`, for example,
+ * `users/example@gmail.com`.
+ *
+ * For advanced filtering, the following functions are also available:
+ *
+ * - `has_link()`: Returns only messages that have at least one hyperlink in
+ * the message text.
+ * - `is_unread()`: Filters out messages that have been read by the calling
+ * user.
+ *
+ * Using the `space.display_name` filter requires that the calling credentials
+ * include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.spaces.readonly`
+ * - `https://www.googleapis.com/auth/chat.spaces`
+ *
+ * Using the `is_unread()` filter requires that the calling credentials
+ * include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
+ * - `https://www.googleapis.com/auth/chat.users.readstate`
+ *
+ *
+ * Across different fields, only `AND` operators are supported. A valid
+ * example is `sender.name = "users/1234567890" AND is_unread()`. The word
+ * `AND` is optional and is implied if omitted. For example, `sender.name =
+ * "users/1234567890" is_unread()` is valid and is equivalent to the previous
+ * example. An invalid example is `sender.name = "users/1234567890" OR
+ * is_unread()` because `OR` is not supported between different fields.
+ *
+ * Among the same field:
+ *
+ * - `create_time` supports only `AND`, and can only be used to represent
+ * an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND
+ * create_time < "2023-01-01T00:00:00+00:00"`.
+ * - `sender.name` supports only the `OR` operator, for example:
+ * `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`.
+ * - `space.name` supports only the `OR` operator, for example:
+ * `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`.
+ * - `space.display_name` supports the operators `AND` and `OR`, but not a
+ * mix of both. For example:
+ * `space.display_name:Project AND space.display_name:Tasks` returns
+ * messages that are in spaces with display names containing both `Project`
+ * and `Tasks`, whereas
+ * `space.display_name:Project OR space.display_name:Tasks` returns messages
+ * that are in spaces with display names containing either `Project` or
+ * `Tasks` or both.
+ * - `annotations.user_mentions.user.name` supports the operators `AND` and
+ * `OR`, but not a mix of both. For example:
+ * `annotations.user_mentions.user.name:"users/1234567890" AND
+ * annotations.user_mentions.user.name:"users/0987654321"` returns only
+ * messages that mentions both users, whereas
+ * `annotations.user_mentions.user.name:"users/1234567890" OR
+ * annotations.user_mentions.user.name:"users/0987654321"` returns messages
+ * that mention either user or both.
+ *
+ * Parentheses are required to disambiguate operator precedence when combining
+ * `AND` and `OR` operators in the same query. For example:
+ * `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`.
+ * Otherwise, parentheses are optional.
+ *
+ * The following example queries are valid:
+ *
+ * ```
+ * "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
+ *
+ * sender.name = "users/example@gmail.com"
+ *
+ * annotations.user_mentions.user.name:"users/0987654321"
+ *
+ * attachment:* AND space.name = "spaces/ABCDEFGH"
+ *
+ * tasks AND is_unread() AND sender.name = "users/1234567890"
+ *
+ * "things to do" "urgent"
+ *
+ * (sender.name = "users/1234567890")
+ * AND (create_time < "2023-05-01T00:00:00Z")
+ *
+ * tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
+ *
+ * "project one" is_unread()
+ *
+ * space.display_name:Project tasks
+ * ```
+ *
+ * The maximum query length is 1,000 characters.
+ *
+ * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
+ * error.
+ *
+ *
+ * string filter = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearFilter() {
+ filter_ = getDefaultInstance().getFilter();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Required. A search query.
+ *
+ * The query can specify one or more search keywords, which are used to filter
+ * the results,
+ *
+ * You can also filter the results using the following message fields:
+ *
+ * - `create_time`: Accepts a timestamp in
+ * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the
+ * supported comparison operators are: `<` and `>=`.
+ * - `sender.name`: The resource name of the sender (`users/{user}`). Only
+ * supports `=`. You can use the e-mail as an alias for `{user}`. For
+ * example, `users/example@gmail.com`, where `example@gmail.com` is the
+ * e-mail of the Google Chat user.
+ * - `space.name`: The resource name of the space where the message is posted.
+ * (`spaces/{space}`). Only supports `=`. If this filter is not set, the
+ * search is performed across all direct messages and spaces the user has
+ * access to as a space member.
+ * - `space.display_name`: Supports the operator `:` (has) and filters spaces
+ * based on a partial match of their display name. Results are limited to
+ * the top five space matches. For example, `space.display_name:Project`
+ * searches for messages in the top five spaces that contain the word
+ * "Project" in their display names.
+ * - `attachment`: Supports the operator `:*` (has any) to check for the
+ * presence of attachments. If `attachment:*` is specified, only messages
+ * that have at least one attachment are returned.
+ * - `annotations.user_mentions.user.name`: The resource name of the mentioned
+ * user (`users/{user}`). Only supports `:` (has). For example:
+ * `annotations.user_mentions.user.name:"users/1234567890"` returns only
+ * messages that contain a mention to the specified user. Alternatively, the
+ * alias `me` can be used to filter for messages that mention the caller
+ * user, for example: `annotations.user_mentions.user.name:users/me`. You
+ * can also use the e-mail as an alias for `{user}`, for example,
+ * `users/example@gmail.com`.
+ *
+ * For advanced filtering, the following functions are also available:
+ *
+ * - `has_link()`: Returns only messages that have at least one hyperlink in
+ * the message text.
+ * - `is_unread()`: Filters out messages that have been read by the calling
+ * user.
+ *
+ * Using the `space.display_name` filter requires that the calling credentials
+ * include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.spaces.readonly`
+ * - `https://www.googleapis.com/auth/chat.spaces`
+ *
+ * Using the `is_unread()` filter requires that the calling credentials
+ * include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
+ * - `https://www.googleapis.com/auth/chat.users.readstate`
+ *
+ *
+ * Across different fields, only `AND` operators are supported. A valid
+ * example is `sender.name = "users/1234567890" AND is_unread()`. The word
+ * `AND` is optional and is implied if omitted. For example, `sender.name =
+ * "users/1234567890" is_unread()` is valid and is equivalent to the previous
+ * example. An invalid example is `sender.name = "users/1234567890" OR
+ * is_unread()` because `OR` is not supported between different fields.
+ *
+ * Among the same field:
+ *
+ * - `create_time` supports only `AND`, and can only be used to represent
+ * an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND
+ * create_time < "2023-01-01T00:00:00+00:00"`.
+ * - `sender.name` supports only the `OR` operator, for example:
+ * `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`.
+ * - `space.name` supports only the `OR` operator, for example:
+ * `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`.
+ * - `space.display_name` supports the operators `AND` and `OR`, but not a
+ * mix of both. For example:
+ * `space.display_name:Project AND space.display_name:Tasks` returns
+ * messages that are in spaces with display names containing both `Project`
+ * and `Tasks`, whereas
+ * `space.display_name:Project OR space.display_name:Tasks` returns messages
+ * that are in spaces with display names containing either `Project` or
+ * `Tasks` or both.
+ * - `annotations.user_mentions.user.name` supports the operators `AND` and
+ * `OR`, but not a mix of both. For example:
+ * `annotations.user_mentions.user.name:"users/1234567890" AND
+ * annotations.user_mentions.user.name:"users/0987654321"` returns only
+ * messages that mentions both users, whereas
+ * `annotations.user_mentions.user.name:"users/1234567890" OR
+ * annotations.user_mentions.user.name:"users/0987654321"` returns messages
+ * that mention either user or both.
+ *
+ * Parentheses are required to disambiguate operator precedence when combining
+ * `AND` and `OR` operators in the same query. For example:
+ * `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`.
+ * Otherwise, parentheses are optional.
+ *
+ * The following example queries are valid:
+ *
+ * ```
+ * "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
+ *
+ * sender.name = "users/example@gmail.com"
+ *
+ * annotations.user_mentions.user.name:"users/0987654321"
+ *
+ * attachment:* AND space.name = "spaces/ABCDEFGH"
+ *
+ * tasks AND is_unread() AND sender.name = "users/1234567890"
+ *
+ * "things to do" "urgent"
+ *
+ * (sender.name = "users/1234567890")
+ * AND (create_time < "2023-05-01T00:00:00Z")
+ *
+ * tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
+ *
+ * "project one" is_unread()
+ *
+ * space.display_name:Project tasks
+ * ```
+ *
+ * The maximum query length is 1,000 characters.
+ *
+ * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
+ * error.
+ *
+ *
+ * string filter = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The bytes for filter to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFilterBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ filter_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ private int pageSize_;
+
+ /**
+ *
+ *
+ *
+ * Optional. The maximum number of results to return. The service may return
+ * fewer than this value.
+ *
+ * If unspecified, at most 25 are returned.
+ *
+ * The maximum value is 100. If you use a value more than 100, it's
+ * automatically changed to 100.
+ *
+ *
+ * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageSize.
+ */
+ @java.lang.Override
+ public int getPageSize() {
+ return pageSize_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The maximum number of results to return. The service may return
+ * fewer than this value.
+ *
+ * If unspecified, at most 25 are returned.
+ *
+ * The maximum value is 100. If you use a value more than 100, it's
+ * automatically changed to 100.
+ *
+ *
+ * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The pageSize to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageSize(int value) {
+
+ pageSize_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The maximum number of results to return. The service may return
+ * fewer than this value.
+ *
+ * If unspecified, at most 25 are returned.
+ *
+ * The maximum value is 100. If you use a value more than 100, it's
+ * automatically changed to 100.
+ *
+ *
+ * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPageSize() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ pageSize_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object pageToken_ = "";
+
+ /**
+ *
+ *
+ *
+ * Optional. A token, received from the previous search messages call. Provide
+ * this parameter to retrieve the subsequent page.
+ *
+ * When paginating, all other parameters provided should match the call that
+ * provided the page token. Passing different values to the other parameters
+ * might lead to unexpected results.
+ *
+ *
+ * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageToken.
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ pageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. A token, received from the previous search messages call. Provide
+ * this parameter to retrieve the subsequent page.
+ *
+ * When paginating, all other parameters provided should match the call that
+ * provided the page token. Passing different values to the other parameters
+ * might lead to unexpected results.
+ *
+ *
+ * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for pageToken.
+ */
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. A token, received from the previous search messages call. Provide
+ * this parameter to retrieve the subsequent page.
+ *
+ * When paginating, all other parameters provided should match the call that
+ * provided the page token. Passing different values to the other parameters
+ * might lead to unexpected results.
+ *
+ *
+ * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The pageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ pageToken_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. A token, received from the previous search messages call. Provide
+ * this parameter to retrieve the subsequent page.
+ *
+ * When paginating, all other parameters provided should match the call that
+ * provided the page token. Passing different values to the other parameters
+ * might lead to unexpected results.
+ *
+ *
+ * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPageToken() {
+ pageToken_ = getDefaultInstance().getPageToken();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. A token, received from the previous search messages call. Provide
+ * this parameter to retrieve the subsequent page.
+ *
+ * When paginating, all other parameters provided should match the call that
+ * provided the page token. Passing different values to the other parameters
+ * might lead to unexpected results.
+ *
+ *
+ * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for pageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ pageToken_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object orderBy_ = "";
+
+ /**
+ *
+ *
+ *
+ * Optional. How the results list is ordered.
+ *
+ * Supported attributes to order by are:
+ *
+ * - `create_time`: Sorts the results by the time of the message creation.
+ * Default value.
+ * - `relevance`: Sorts the results by relevance.
+ * [Developer Preview](https://developers.google.com/workspace/preview).
+ *
+ * The default ordering is `create_time desc`. Only a single order per query
+ * (`create_time` or `relevance`) is supported. Only descending order (`desc`)
+ * is supported, and it must be specified after the order attribute.
+ *
+ *
+ * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The orderBy.
+ */
+ public java.lang.String getOrderBy() {
+ java.lang.Object ref = orderBy_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ orderBy_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. How the results list is ordered.
+ *
+ * Supported attributes to order by are:
+ *
+ * - `create_time`: Sorts the results by the time of the message creation.
+ * Default value.
+ * - `relevance`: Sorts the results by relevance.
+ * [Developer Preview](https://developers.google.com/workspace/preview).
+ *
+ * The default ordering is `create_time desc`. Only a single order per query
+ * (`create_time` or `relevance`) is supported. Only descending order (`desc`)
+ * is supported, and it must be specified after the order attribute.
+ *
+ *
+ * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for orderBy.
+ */
+ public com.google.protobuf.ByteString getOrderByBytes() {
+ java.lang.Object ref = orderBy_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ orderBy_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. How the results list is ordered.
+ *
+ * Supported attributes to order by are:
+ *
+ * - `create_time`: Sorts the results by the time of the message creation.
+ * Default value.
+ * - `relevance`: Sorts the results by relevance.
+ * [Developer Preview](https://developers.google.com/workspace/preview).
+ *
+ * The default ordering is `create_time desc`. Only a single order per query
+ * (`create_time` or `relevance`) is supported. Only descending order (`desc`)
+ * is supported, and it must be specified after the order attribute.
+ *
+ *
+ * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The orderBy to set.
+ * @return This builder for chaining.
+ */
+ public Builder setOrderBy(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ orderBy_ = value;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. How the results list is ordered.
+ *
+ * Supported attributes to order by are:
+ *
+ * - `create_time`: Sorts the results by the time of the message creation.
+ * Default value.
+ * - `relevance`: Sorts the results by relevance.
+ * [Developer Preview](https://developers.google.com/workspace/preview).
+ *
+ * The default ordering is `create_time desc`. Only a single order per query
+ * (`create_time` or `relevance`) is supported. Only descending order (`desc`)
+ * is supported, and it must be specified after the order attribute.
+ *
+ *
+ * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearOrderBy() {
+ orderBy_ = getDefaultInstance().getOrderBy();
+ bitField0_ = (bitField0_ & ~0x00000010);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. How the results list is ordered.
+ *
+ * Supported attributes to order by are:
+ *
+ * - `create_time`: Sorts the results by the time of the message creation.
+ * Default value.
+ * - `relevance`: Sorts the results by relevance.
+ * [Developer Preview](https://developers.google.com/workspace/preview).
+ *
+ * The default ordering is `create_time desc`. Only a single order per query
+ * (`create_time` or `relevance`) is supported. Only descending order (`desc`)
+ * is supported, and it must be specified after the order attribute.
+ *
+ *
+ * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for orderBy to set.
+ * @return This builder for chaining.
+ */
+ public Builder setOrderByBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ orderBy_ = value;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+
+ private int view_ = 0;
+
+ /**
+ *
+ *
+ *
+ * Optional. Specifies what kind of search results view to return. The default
+ * is `SEARCH_MESSAGES_VIEW_BASIC`.
+ *
+ *
+ *
+ * .google.chat.v1.SearchMessagesRequest.SearchMessagesView view = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The enum numeric value on the wire for view.
+ */
+ @java.lang.Override
+ public int getViewValue() {
+ return view_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Specifies what kind of search results view to return. The default
+ * is `SEARCH_MESSAGES_VIEW_BASIC`.
+ *
+ *
+ *
+ * .google.chat.v1.SearchMessagesRequest.SearchMessagesView view = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @param value The enum numeric value on the wire for view to set.
+ * @return This builder for chaining.
+ */
+ public Builder setViewValue(int value) {
+ view_ = value;
+ bitField0_ |= 0x00000020;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Specifies what kind of search results view to return. The default
+ * is `SEARCH_MESSAGES_VIEW_BASIC`.
+ *
+ *
+ *
+ * .google.chat.v1.SearchMessagesRequest.SearchMessagesView view = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The view.
+ */
+ @java.lang.Override
+ public com.google.chat.v1.SearchMessagesRequest.SearchMessagesView getView() {
+ com.google.chat.v1.SearchMessagesRequest.SearchMessagesView result =
+ com.google.chat.v1.SearchMessagesRequest.SearchMessagesView.forNumber(view_);
+ return result == null
+ ? com.google.chat.v1.SearchMessagesRequest.SearchMessagesView.UNRECOGNIZED
+ : result;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Specifies what kind of search results view to return. The default
+ * is `SEARCH_MESSAGES_VIEW_BASIC`.
+ *
+ *
+ *
+ * .google.chat.v1.SearchMessagesRequest.SearchMessagesView view = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @param value The view to set.
+ * @return This builder for chaining.
+ */
+ public Builder setView(com.google.chat.v1.SearchMessagesRequest.SearchMessagesView value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000020;
+ view_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Specifies what kind of search results view to return. The default
+ * is `SEARCH_MESSAGES_VIEW_BASIC`.
+ *
+ *
+ *
+ * .google.chat.v1.SearchMessagesRequest.SearchMessagesView view = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearView() {
+ bitField0_ = (bitField0_ & ~0x00000020);
+ view_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.chat.v1.SearchMessagesRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.chat.v1.SearchMessagesRequest)
+ private static final com.google.chat.v1.SearchMessagesRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.chat.v1.SearchMessagesRequest();
+ }
+
+ public static com.google.chat.v1.SearchMessagesRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Required. The resource name of the space to search within.
+ *
+ * To search across all spaces the user has access to, set this field to
+ * `spaces/-`. Using any other value for `parent` results in an
+ * `INVALID_ARGUMENT` error.
+ *
+ * To limit the search to one or more spaces, use `space.name` or
+ * `space.display_name` in the `filter`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The parent.
+ */
+ java.lang.String getParent();
+
+ /**
+ *
+ *
+ *
+ * Required. The resource name of the space to search within.
+ *
+ * To search across all spaces the user has access to, set this field to
+ * `spaces/-`. Using any other value for `parent` results in an
+ * `INVALID_ARGUMENT` error.
+ *
+ * To limit the search to one or more spaces, use `space.name` or
+ * `space.display_name` in the `filter`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for parent.
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ *
+ * Required. A search query.
+ *
+ * The query can specify one or more search keywords, which are used to filter
+ * the results,
+ *
+ * You can also filter the results using the following message fields:
+ *
+ * - `create_time`: Accepts a timestamp in
+ * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the
+ * supported comparison operators are: `<` and `>=`.
+ * - `sender.name`: The resource name of the sender (`users/{user}`). Only
+ * supports `=`. You can use the e-mail as an alias for `{user}`. For
+ * example, `users/example@gmail.com`, where `example@gmail.com` is the
+ * e-mail of the Google Chat user.
+ * - `space.name`: The resource name of the space where the message is posted.
+ * (`spaces/{space}`). Only supports `=`. If this filter is not set, the
+ * search is performed across all direct messages and spaces the user has
+ * access to as a space member.
+ * - `space.display_name`: Supports the operator `:` (has) and filters spaces
+ * based on a partial match of their display name. Results are limited to
+ * the top five space matches. For example, `space.display_name:Project`
+ * searches for messages in the top five spaces that contain the word
+ * "Project" in their display names.
+ * - `attachment`: Supports the operator `:*` (has any) to check for the
+ * presence of attachments. If `attachment:*` is specified, only messages
+ * that have at least one attachment are returned.
+ * - `annotations.user_mentions.user.name`: The resource name of the mentioned
+ * user (`users/{user}`). Only supports `:` (has). For example:
+ * `annotations.user_mentions.user.name:"users/1234567890"` returns only
+ * messages that contain a mention to the specified user. Alternatively, the
+ * alias `me` can be used to filter for messages that mention the caller
+ * user, for example: `annotations.user_mentions.user.name:users/me`. You
+ * can also use the e-mail as an alias for `{user}`, for example,
+ * `users/example@gmail.com`.
+ *
+ * For advanced filtering, the following functions are also available:
+ *
+ * - `has_link()`: Returns only messages that have at least one hyperlink in
+ * the message text.
+ * - `is_unread()`: Filters out messages that have been read by the calling
+ * user.
+ *
+ * Using the `space.display_name` filter requires that the calling credentials
+ * include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.spaces.readonly`
+ * - `https://www.googleapis.com/auth/chat.spaces`
+ *
+ * Using the `is_unread()` filter requires that the calling credentials
+ * include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
+ * - `https://www.googleapis.com/auth/chat.users.readstate`
+ *
+ *
+ * Across different fields, only `AND` operators are supported. A valid
+ * example is `sender.name = "users/1234567890" AND is_unread()`. The word
+ * `AND` is optional and is implied if omitted. For example, `sender.name =
+ * "users/1234567890" is_unread()` is valid and is equivalent to the previous
+ * example. An invalid example is `sender.name = "users/1234567890" OR
+ * is_unread()` because `OR` is not supported between different fields.
+ *
+ * Among the same field:
+ *
+ * - `create_time` supports only `AND`, and can only be used to represent
+ * an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND
+ * create_time < "2023-01-01T00:00:00+00:00"`.
+ * - `sender.name` supports only the `OR` operator, for example:
+ * `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`.
+ * - `space.name` supports only the `OR` operator, for example:
+ * `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`.
+ * - `space.display_name` supports the operators `AND` and `OR`, but not a
+ * mix of both. For example:
+ * `space.display_name:Project AND space.display_name:Tasks` returns
+ * messages that are in spaces with display names containing both `Project`
+ * and `Tasks`, whereas
+ * `space.display_name:Project OR space.display_name:Tasks` returns messages
+ * that are in spaces with display names containing either `Project` or
+ * `Tasks` or both.
+ * - `annotations.user_mentions.user.name` supports the operators `AND` and
+ * `OR`, but not a mix of both. For example:
+ * `annotations.user_mentions.user.name:"users/1234567890" AND
+ * annotations.user_mentions.user.name:"users/0987654321"` returns only
+ * messages that mentions both users, whereas
+ * `annotations.user_mentions.user.name:"users/1234567890" OR
+ * annotations.user_mentions.user.name:"users/0987654321"` returns messages
+ * that mention either user or both.
+ *
+ * Parentheses are required to disambiguate operator precedence when combining
+ * `AND` and `OR` operators in the same query. For example:
+ * `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`.
+ * Otherwise, parentheses are optional.
+ *
+ * The following example queries are valid:
+ *
+ * ```
+ * "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
+ *
+ * sender.name = "users/example@gmail.com"
+ *
+ * annotations.user_mentions.user.name:"users/0987654321"
+ *
+ * attachment:* AND space.name = "spaces/ABCDEFGH"
+ *
+ * tasks AND is_unread() AND sender.name = "users/1234567890"
+ *
+ * "things to do" "urgent"
+ *
+ * (sender.name = "users/1234567890")
+ * AND (create_time < "2023-05-01T00:00:00Z")
+ *
+ * tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
+ *
+ * "project one" is_unread()
+ *
+ * space.display_name:Project tasks
+ * ```
+ *
+ * The maximum query length is 1,000 characters.
+ *
+ * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
+ * error.
+ *
+ *
+ * string filter = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The filter.
+ */
+ java.lang.String getFilter();
+
+ /**
+ *
+ *
+ *
+ * Required. A search query.
+ *
+ * The query can specify one or more search keywords, which are used to filter
+ * the results,
+ *
+ * You can also filter the results using the following message fields:
+ *
+ * - `create_time`: Accepts a timestamp in
+ * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the
+ * supported comparison operators are: `<` and `>=`.
+ * - `sender.name`: The resource name of the sender (`users/{user}`). Only
+ * supports `=`. You can use the e-mail as an alias for `{user}`. For
+ * example, `users/example@gmail.com`, where `example@gmail.com` is the
+ * e-mail of the Google Chat user.
+ * - `space.name`: The resource name of the space where the message is posted.
+ * (`spaces/{space}`). Only supports `=`. If this filter is not set, the
+ * search is performed across all direct messages and spaces the user has
+ * access to as a space member.
+ * - `space.display_name`: Supports the operator `:` (has) and filters spaces
+ * based on a partial match of their display name. Results are limited to
+ * the top five space matches. For example, `space.display_name:Project`
+ * searches for messages in the top five spaces that contain the word
+ * "Project" in their display names.
+ * - `attachment`: Supports the operator `:*` (has any) to check for the
+ * presence of attachments. If `attachment:*` is specified, only messages
+ * that have at least one attachment are returned.
+ * - `annotations.user_mentions.user.name`: The resource name of the mentioned
+ * user (`users/{user}`). Only supports `:` (has). For example:
+ * `annotations.user_mentions.user.name:"users/1234567890"` returns only
+ * messages that contain a mention to the specified user. Alternatively, the
+ * alias `me` can be used to filter for messages that mention the caller
+ * user, for example: `annotations.user_mentions.user.name:users/me`. You
+ * can also use the e-mail as an alias for `{user}`, for example,
+ * `users/example@gmail.com`.
+ *
+ * For advanced filtering, the following functions are also available:
+ *
+ * - `has_link()`: Returns only messages that have at least one hyperlink in
+ * the message text.
+ * - `is_unread()`: Filters out messages that have been read by the calling
+ * user.
+ *
+ * Using the `space.display_name` filter requires that the calling credentials
+ * include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.spaces.readonly`
+ * - `https://www.googleapis.com/auth/chat.spaces`
+ *
+ * Using the `is_unread()` filter requires that the calling credentials
+ * include one of the following [authorization
+ * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ *
+ * - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
+ * - `https://www.googleapis.com/auth/chat.users.readstate`
+ *
+ *
+ * Across different fields, only `AND` operators are supported. A valid
+ * example is `sender.name = "users/1234567890" AND is_unread()`. The word
+ * `AND` is optional and is implied if omitted. For example, `sender.name =
+ * "users/1234567890" is_unread()` is valid and is equivalent to the previous
+ * example. An invalid example is `sender.name = "users/1234567890" OR
+ * is_unread()` because `OR` is not supported between different fields.
+ *
+ * Among the same field:
+ *
+ * - `create_time` supports only `AND`, and can only be used to represent
+ * an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND
+ * create_time < "2023-01-01T00:00:00+00:00"`.
+ * - `sender.name` supports only the `OR` operator, for example:
+ * `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`.
+ * - `space.name` supports only the `OR` operator, for example:
+ * `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`.
+ * - `space.display_name` supports the operators `AND` and `OR`, but not a
+ * mix of both. For example:
+ * `space.display_name:Project AND space.display_name:Tasks` returns
+ * messages that are in spaces with display names containing both `Project`
+ * and `Tasks`, whereas
+ * `space.display_name:Project OR space.display_name:Tasks` returns messages
+ * that are in spaces with display names containing either `Project` or
+ * `Tasks` or both.
+ * - `annotations.user_mentions.user.name` supports the operators `AND` and
+ * `OR`, but not a mix of both. For example:
+ * `annotations.user_mentions.user.name:"users/1234567890" AND
+ * annotations.user_mentions.user.name:"users/0987654321"` returns only
+ * messages that mentions both users, whereas
+ * `annotations.user_mentions.user.name:"users/1234567890" OR
+ * annotations.user_mentions.user.name:"users/0987654321"` returns messages
+ * that mention either user or both.
+ *
+ * Parentheses are required to disambiguate operator precedence when combining
+ * `AND` and `OR` operators in the same query. For example:
+ * `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`.
+ * Otherwise, parentheses are optional.
+ *
+ * The following example queries are valid:
+ *
+ * ```
+ * "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
+ *
+ * sender.name = "users/example@gmail.com"
+ *
+ * annotations.user_mentions.user.name:"users/0987654321"
+ *
+ * attachment:* AND space.name = "spaces/ABCDEFGH"
+ *
+ * tasks AND is_unread() AND sender.name = "users/1234567890"
+ *
+ * "things to do" "urgent"
+ *
+ * (sender.name = "users/1234567890")
+ * AND (create_time < "2023-05-01T00:00:00Z")
+ *
+ * tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
+ *
+ * "project one" is_unread()
+ *
+ * space.display_name:Project tasks
+ * ```
+ *
+ * The maximum query length is 1,000 characters.
+ *
+ * Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
+ * error.
+ *
+ *
+ * string filter = 2 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for filter.
+ */
+ com.google.protobuf.ByteString getFilterBytes();
+
+ /**
+ *
+ *
+ *
+ * Optional. The maximum number of results to return. The service may return
+ * fewer than this value.
+ *
+ * If unspecified, at most 25 are returned.
+ *
+ * The maximum value is 100. If you use a value more than 100, it's
+ * automatically changed to 100.
+ *
+ *
+ * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageSize.
+ */
+ int getPageSize();
+
+ /**
+ *
+ *
+ *
+ * Optional. A token, received from the previous search messages call. Provide
+ * this parameter to retrieve the subsequent page.
+ *
+ * When paginating, all other parameters provided should match the call that
+ * provided the page token. Passing different values to the other parameters
+ * might lead to unexpected results.
+ *
+ *
+ * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageToken.
+ */
+ java.lang.String getPageToken();
+
+ /**
+ *
+ *
+ *
+ * Optional. A token, received from the previous search messages call. Provide
+ * this parameter to retrieve the subsequent page.
+ *
+ * When paginating, all other parameters provided should match the call that
+ * provided the page token. Passing different values to the other parameters
+ * might lead to unexpected results.
+ *
+ *
+ * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for pageToken.
+ */
+ com.google.protobuf.ByteString getPageTokenBytes();
+
+ /**
+ *
+ *
+ *
+ * Optional. How the results list is ordered.
+ *
+ * Supported attributes to order by are:
+ *
+ * - `create_time`: Sorts the results by the time of the message creation.
+ * Default value.
+ * - `relevance`: Sorts the results by relevance.
+ * [Developer Preview](https://developers.google.com/workspace/preview).
+ *
+ * The default ordering is `create_time desc`. Only a single order per query
+ * (`create_time` or `relevance`) is supported. Only descending order (`desc`)
+ * is supported, and it must be specified after the order attribute.
+ *
+ *
+ * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The orderBy.
+ */
+ java.lang.String getOrderBy();
+
+ /**
+ *
+ *
+ *
+ * Optional. How the results list is ordered.
+ *
+ * Supported attributes to order by are:
+ *
+ * - `create_time`: Sorts the results by the time of the message creation.
+ * Default value.
+ * - `relevance`: Sorts the results by relevance.
+ * [Developer Preview](https://developers.google.com/workspace/preview).
+ *
+ * The default ordering is `create_time desc`. Only a single order per query
+ * (`create_time` or `relevance`) is supported. Only descending order (`desc`)
+ * is supported, and it must be specified after the order attribute.
+ *
+ *
+ * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for orderBy.
+ */
+ com.google.protobuf.ByteString getOrderByBytes();
+
+ /**
+ *
+ *
+ *
+ * Optional. Specifies what kind of search results view to return. The default
+ * is `SEARCH_MESSAGES_VIEW_BASIC`.
+ *
+ *
+ *
+ * .google.chat.v1.SearchMessagesRequest.SearchMessagesView view = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The enum numeric value on the wire for view.
+ */
+ int getViewValue();
+
+ /**
+ *
+ *
+ *
+ * Optional. Specifies what kind of search results view to return. The default
+ * is `SEARCH_MESSAGES_VIEW_BASIC`.
+ *
+ *
+ *
+ * .google.chat.v1.SearchMessagesRequest.SearchMessagesView view = 7 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The view.
+ */
+ com.google.chat.v1.SearchMessagesRequest.SearchMessagesView getView();
+}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchMessagesResponse.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchMessagesResponse.java
new file mode 100644
index 000000000000..cec5f78914d7
--- /dev/null
+++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchMessagesResponse.java
@@ -0,0 +1,1115 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// NO CHECKED-IN PROTOBUF GENCODE
+// source: google/chat/v1/message.proto
+// Protobuf Java Version: 4.33.6
+
+package com.google.chat.v1;
+
+/**
+ *
+ *
+ *
+ * Response message for searching messages.
+ *
+ *
+ * Protobuf type {@code google.chat.v1.SearchMessagesResponse}
+ */
+@com.google.protobuf.Generated
+public final class SearchMessagesResponse extends com.google.protobuf.GeneratedMessage
+ implements
+ // @@protoc_insertion_point(message_implements:google.chat.v1.SearchMessagesResponse)
+ SearchMessagesResponseOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 33,
+ /* patch= */ 6,
+ /* suffix= */ "",
+ "SearchMessagesResponse");
+ }
+
+ // Use SearchMessagesResponse.newBuilder() to construct.
+ private SearchMessagesResponse(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ }
+
+ private SearchMessagesResponse() {
+ results_ = java.util.Collections.emptyList();
+ nextPageToken_ = "";
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.chat.v1.MessageProto
+ .internal_static_google_chat_v1_SearchMessagesResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.chat.v1.MessageProto
+ .internal_static_google_chat_v1_SearchMessagesResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.chat.v1.SearchMessagesResponse.class,
+ com.google.chat.v1.SearchMessagesResponse.Builder.class);
+ }
+
+ public static final int RESULTS_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private java.util.List
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ @java.lang.Override
+ public java.util.List
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.chat.v1.SearchMessageResultOrBuilder>
+ getResultsOrBuilderList() {
+ return results_;
+ }
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ @java.lang.Override
+ public int getResultsCount() {
+ return results_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ @java.lang.Override
+ public com.google.chat.v1.SearchMessageResult getResults(int index) {
+ return results_.get(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ @java.lang.Override
+ public com.google.chat.v1.SearchMessageResultOrBuilder getResultsOrBuilder(int index) {
+ return results_.get(index);
+ }
+
+ public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object nextPageToken_ = "";
+
+ /**
+ *
+ *
+ *
+ * A token that can be used to retrieve the next page. If this field is empty,
+ * there are no subsequent pages.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ @java.lang.Override
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nextPageToken_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * A token that can be used to retrieve the next page. If this field is empty,
+ * there are no subsequent pages.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ for (int i = 0; i < results_.size(); i++) {
+ output.writeMessage(1, results_.get(i));
+ }
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < results_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, results_.get(i));
+ }
+ if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.chat.v1.SearchMessagesResponse)) {
+ return super.equals(obj);
+ }
+ com.google.chat.v1.SearchMessagesResponse other =
+ (com.google.chat.v1.SearchMessagesResponse) obj;
+
+ if (!getResultsList().equals(other.getResultsList())) return false;
+ if (!getNextPageToken().equals(other.getNextPageToken())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getResultsCount() > 0) {
+ hash = (37 * hash) + RESULTS_FIELD_NUMBER;
+ hash = (53 * hash) + getResultsList().hashCode();
+ }
+ hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getNextPageToken().hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.chat.v1.SearchMessagesResponse parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.chat.v1.SearchMessagesResponse parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.chat.v1.SearchMessagesResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.chat.v1.SearchMessagesResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.chat.v1.SearchMessagesResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.chat.v1.SearchMessagesResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.chat.v1.SearchMessagesResponse parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.chat.v1.SearchMessagesResponse parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.chat.v1.SearchMessagesResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.chat.v1.SearchMessagesResponse parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.chat.v1.SearchMessagesResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.chat.v1.SearchMessagesResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.chat.v1.SearchMessagesResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ *
+ * Response message for searching messages.
+ *
+ *
+ * Protobuf type {@code google.chat.v1.SearchMessagesResponse}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ public java.util.List
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ public int getResultsCount() {
+ if (resultsBuilder_ == null) {
+ return results_.size();
+ } else {
+ return resultsBuilder_.getCount();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ public com.google.chat.v1.SearchMessageResult getResults(int index) {
+ if (resultsBuilder_ == null) {
+ return results_.get(index);
+ } else {
+ return resultsBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ public Builder setResults(int index, com.google.chat.v1.SearchMessageResult value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.set(index, value);
+ onChanged();
+ } else {
+ resultsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ public Builder setResults(
+ int index, com.google.chat.v1.SearchMessageResult.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ public Builder addResults(com.google.chat.v1.SearchMessageResult value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.add(value);
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ public Builder addResults(int index, com.google.chat.v1.SearchMessageResult value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.add(index, value);
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ public Builder addResults(com.google.chat.v1.SearchMessageResult.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.add(builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ public Builder addResults(
+ int index, com.google.chat.v1.SearchMessageResult.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ public Builder addAllResults(
+ java.lang.Iterable extends com.google.chat.v1.SearchMessageResult> values) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_);
+ onChanged();
+ } else {
+ resultsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ public Builder clearResults() {
+ if (resultsBuilder_ == null) {
+ results_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ resultsBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ public Builder removeResults(int index) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.remove(index);
+ onChanged();
+ } else {
+ resultsBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ public com.google.chat.v1.SearchMessageResult.Builder getResultsBuilder(int index) {
+ return internalGetResultsFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ public com.google.chat.v1.SearchMessageResultOrBuilder getResultsOrBuilder(int index) {
+ if (resultsBuilder_ == null) {
+ return results_.get(index);
+ } else {
+ return resultsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ public java.util.List extends com.google.chat.v1.SearchMessageResultOrBuilder>
+ getResultsOrBuilderList() {
+ if (resultsBuilder_ != null) {
+ return resultsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(results_);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ public com.google.chat.v1.SearchMessageResult.Builder addResultsBuilder() {
+ return internalGetResultsFieldBuilder()
+ .addBuilder(com.google.chat.v1.SearchMessageResult.getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ public com.google.chat.v1.SearchMessageResult.Builder addResultsBuilder(int index) {
+ return internalGetResultsFieldBuilder()
+ .addBuilder(index, com.google.chat.v1.SearchMessageResult.getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ public java.util.List
+ * A token that can be used to retrieve the next page. If this field is empty,
+ * there are no subsequent pages.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nextPageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * A token that can be used to retrieve the next page. If this field is empty,
+ * there are no subsequent pages.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * A token that can be used to retrieve the next page. If this field is empty,
+ * there are no subsequent pages.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @param value The nextPageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNextPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ nextPageToken_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * A token that can be used to retrieve the next page. If this field is empty,
+ * there are no subsequent pages.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearNextPageToken() {
+ nextPageToken_ = getDefaultInstance().getNextPageToken();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * A token that can be used to retrieve the next page. If this field is empty,
+ * there are no subsequent pages.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @param value The bytes for nextPageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ nextPageToken_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.chat.v1.SearchMessagesResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.chat.v1.SearchMessagesResponse)
+ private static final com.google.chat.v1.SearchMessagesResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.chat.v1.SearchMessagesResponse();
+ }
+
+ public static com.google.chat.v1.SearchMessagesResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ java.util.List
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ com.google.chat.v1.SearchMessageResult getResults(int index);
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ int getResultsCount();
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ java.util.List extends com.google.chat.v1.SearchMessageResultOrBuilder>
+ getResultsOrBuilderList();
+
+ /**
+ *
+ *
+ *
+ * The list of search results that matched the query.
+ *
+ *
+ * repeated .google.chat.v1.SearchMessageResult results = 1;
+ */
+ com.google.chat.v1.SearchMessageResultOrBuilder getResultsOrBuilder(int index);
+
+ /**
+ *
+ *
+ *
+ * A token that can be used to retrieve the next page. If this field is empty,
+ * there are no subsequent pages.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ java.lang.String getNextPageToken();
+
+ /**
+ *
+ *
+ *
+ * A token that can be used to retrieve the next page. If this field is empty,
+ * there are no subsequent pages.
+ *
+ *
+ * string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ com.google.protobuf.ByteString getNextPageTokenBytes();
+}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Space.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Space.java
index 09209593adc9..675bf2368d67 100644
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Space.java
+++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/Space.java
@@ -467,9 +467,9 @@ public enum SpaceThreadingState implements com.google.protobuf.ProtocolMessageEn
*
*
*
- * Named spaces that support message threads. When users respond to a
- * message, they can reply in-thread, which keeps their response in the
- * context of the original message.
+ * Spaces that support message threads. When users respond to a message,
+ * they can reply in-thread, which keeps their response in the context of
+ * the original message.
*
*
* THREADED_MESSAGES = 2;
@@ -490,8 +490,11 @@ public enum SpaceThreadingState implements com.google.protobuf.ProtocolMessageEn
*
*
*
- * Direct messages (DMs) between two people and group conversations between
- * 3 or more people.
+ * Spaces that don't support message threading. This space threading state
+ * is only used for special cases including:
+ *
+ * * Continuous meeting chat where threading is intentionally turned off.
+ * * Legacy group conversations that were created prior to 2022.
*
*
* UNTHREADED_MESSAGES = 4;
@@ -525,9 +528,9 @@ public enum SpaceThreadingState implements com.google.protobuf.ProtocolMessageEn
*
*
*
- * Named spaces that support message threads. When users respond to a
- * message, they can reply in-thread, which keeps their response in the
- * context of the original message.
+ * Spaces that support message threads. When users respond to a message,
+ * they can reply in-thread, which keeps their response in the context of
+ * the original message.
*
*
* THREADED_MESSAGES = 2;
@@ -550,8 +553,11 @@ public enum SpaceThreadingState implements com.google.protobuf.ProtocolMessageEn
*
*
*
- * Direct messages (DMs) between two people and group conversations between
- * 3 or more people.
+ * Spaces that don't support message threading. This space threading state
+ * is only used for special cases including:
+ *
+ * * Continuous meeting chat where threading is intentionally turned off.
+ * * Legacy group conversations that were created prior to 2022.
*
*
* UNTHREADED_MESSAGES = 4;
@@ -11132,7 +11138,7 @@ public com.google.protobuf.ByteString getNameBytes() {
* .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
*
*
- * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=302
+ * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=305
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override
@@ -11153,7 +11159,7 @@ public int getTypeValue() {
* .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
*
*
- * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=302
+ * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=305
* @return The type.
*/
@java.lang.Override
@@ -11239,7 +11245,7 @@ public boolean getSingleUserBotDm() {
*
* bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
*
- * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=314
+ * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=317
* @return The threaded.
*/
@java.lang.Override
@@ -13329,7 +13335,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) {
* .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
*
*
- * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=302
+ * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=305
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override
@@ -13350,7 +13356,7 @@ public int getTypeValue() {
* .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
*
*
- * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=302
+ * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=305
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
@@ -13374,7 +13380,7 @@ public Builder setTypeValue(int value) {
* .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
*
*
- * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=302
+ * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=305
* @return The type.
*/
@java.lang.Override
@@ -13396,7 +13402,7 @@ public com.google.chat.v1.Space.Type getType() {
* .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
*
*
- * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=302
+ * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=305
* @param value The type to set.
* @return This builder for chaining.
*/
@@ -13423,7 +13429,7 @@ public Builder setType(com.google.chat.v1.Space.Type value) {
* .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
*
*
- * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=302
+ * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=305
* @return This builder for chaining.
*/
@java.lang.Deprecated
@@ -13616,7 +13622,7 @@ public Builder clearSingleUserBotDm() {
* bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
*
*
- * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=314
+ * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=317
* @return The threaded.
*/
@java.lang.Override
@@ -13636,7 +13642,7 @@ public boolean getThreaded() {
* bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
*
*
- * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=314
+ * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=317
* @param value The threaded to set.
* @return This builder for chaining.
*/
@@ -13660,7 +13666,7 @@ public Builder setThreaded(boolean value) {
* bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
*
*
- * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=314
+ * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=317
* @return This builder for chaining.
*/
@java.lang.Deprecated
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceOrBuilder.java
index 1618944c9001..e54aa0bf1ba8 100644
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceOrBuilder.java
+++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceOrBuilder.java
@@ -82,7 +82,7 @@ public interface SpaceOrBuilder
* .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
*
*
- * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=302
+ * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=305
* @return The enum numeric value on the wire for type.
*/
@java.lang.Deprecated
@@ -100,7 +100,7 @@ public interface SpaceOrBuilder
* .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
*
*
- * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=302
+ * @deprecated google.chat.v1.Space.type is deprecated. See google/chat/v1/space.proto;l=305
* @return The type.
*/
@java.lang.Deprecated
@@ -162,7 +162,7 @@ public interface SpaceOrBuilder
*
* bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY];
*
- * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=314
+ * @deprecated google.chat.v1.Space.threaded is deprecated. See google/chat/v1/space.proto;l=317
* @return The threaded.
*/
@java.lang.Deprecated
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/chat_service.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/chat_service.proto
index fcf714fb95aa..02fc5e445163 100644
--- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/chat_service.proto
+++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/chat_service.proto
@@ -342,6 +342,41 @@ service ChatService {
option (google.api.method_signature) = "name";
}
+ // Searches for messages in Google Chat that the calling user has access to.
+ // Returns a list of messages matching the search criteria.
+ //
+ // To search across all spaces the user has access to, set `parent` to
+ // `spaces/-`. Using any other value for `parent` results in an
+ // `INVALID_ARGUMENT` error. The returned messages have their `name` field
+ // populated with the full resource name, which includes the specific `space`
+ // in which the message resides.
+ //
+ // This API doesn't return all message types. The types of messages listed
+ // below aren't included in the response. Use
+ // [ListMessages][google.chat.v1.ChatService.ListMessages] to list all
+ // messages.
+ //
+ // - Private Messages that are visible to the authenticated user.
+ // - Messages posted by Chat apps in spaces or group chats.
+ // - Messages in a Chat app DM.
+ // - Messages from blocked users.
+ // - Messages in spaces that the caller has muted.
+ //
+ // Requires [user
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+ // with one of the following [authorization
+ // scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ //
+ // - `https://www.googleapis.com/auth/chat.messages.readonly`
+ // - `https://www.googleapis.com/auth/chat.messages`
+ rpc SearchMessages(SearchMessagesRequest) returns (SearchMessagesResponse) {
+ option (google.api.http) = {
+ post: "/v1/{parent=spaces/*}/messages:search"
+ body: "*"
+ };
+ option (google.api.method_signature) = "parent,filter";
+ }
+
// Gets the metadata of a message attachment. The attachment data is fetched
// using the [media
// API](https://developers.google.com/workspace/chat/api/reference/rest/v1/media/download).
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/message.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/message.proto
index ed78f5e50c99..22d53f09d3d6 100644
--- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/message.proto
+++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/message.proto
@@ -28,6 +28,7 @@ import "google/chat/v1/matched_url.proto";
import "google/chat/v1/reaction.proto";
import "google/chat/v1/slash_command.proto";
import "google/chat/v1/space.proto";
+import "google/chat/v1/space_notification_setting.proto";
import "google/chat/v1/user.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
@@ -112,8 +113,8 @@ message Message {
//
// * [Markup
// syntax](https://developers.google.com/workspace/chat/format-messages)
- // for bold, italic, strikethrough, monospace, monospace block, and bulleted
- // list.
+ // for bold, italic, strikethrough, monospace, monospace block, bulleted
+ // list, and block quote.
//
// * [User
// mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention)
@@ -191,8 +192,8 @@ message Message {
// Optional. User-uploaded attachment.
repeated Attachment attachment = 18 [(google.api.field_behavior) = OPTIONAL];
- // Output only. A URL in `spaces.messages.text` that matches a link preview
- // pattern. For more information, see [Preview
+ // Output only. A URL in the Chat message `text` field that matches a link
+ // preview pattern. For more information, see [Preview
// links](https://developers.google.com/workspace/chat/preview-links).
MatchedUrl matched_url = 20 [(google.api.field_behavior) = OUTPUT_ONLY];
@@ -677,9 +678,9 @@ message CreateMessageNotificationOptions {
// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
NOTIFICATION_TYPE_FORCE_NOTIFY = 2;
- // Silence the notification as if the recipients have [Chat Do Not
- // Disturb](https://support.google.com/chat/answer/9093489) enabled or
- // have muted the space.
+ // Do not notify recipients, and do not mark the message as unread.
+ // This behaves similarly to the user muting the conversation or enabling
+ // [Chat Do Not Disturb](https://support.google.com/chat/answer/9093489).
//
// Requires [app authentication]
// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
@@ -830,3 +831,232 @@ message CardWithId {
// A card. Maximum size is 32 KB.
google.apps.card.v1.Card card = 2;
}
+
+// Request message for searching messages.
+message SearchMessagesRequest {
+ // The kinds of view that are supported for partial search results.
+ enum SearchMessagesView {
+ // The default / unset value.
+ // The API will default to the BASIC view.
+ SEARCH_MESSAGES_VIEW_UNSPECIFIED = 0;
+
+ // Includes only the matched messages in the results, but no additional
+ // metadata. This is the default value.
+ SEARCH_MESSAGES_VIEW_BASIC = 1;
+
+ // Includes everything in the results: the matched messages and additional
+ // metadata.
+ SEARCH_MESSAGES_VIEW_FULL = 2;
+ }
+
+ // Required. The resource name of the space to search within.
+ //
+ // To search across all spaces the user has access to, set this field to
+ // `spaces/-`. Using any other value for `parent` results in an
+ // `INVALID_ARGUMENT` error.
+ //
+ // To limit the search to one or more spaces, use `space.name` or
+ // `space.display_name` in the `filter`.
+ string parent = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = { type: "chat.googleapis.com/Space" }
+ ];
+
+ // Required. A search query.
+ //
+ // The query can specify one or more search keywords, which are used to filter
+ // the results,
+ //
+ // You can also filter the results using the following message fields:
+ //
+ // - `create_time`: Accepts a timestamp in
+ // [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the
+ // supported comparison operators are: `<` and `>=`.
+ // - `sender.name`: The resource name of the sender (`users/{user}`). Only
+ // supports `=`. You can use the e-mail as an alias for `{user}`. For
+ // example, `users/example@gmail.com`, where `example@gmail.com` is the
+ // e-mail of the Google Chat user.
+ // - `space.name`: The resource name of the space where the message is posted.
+ // (`spaces/{space}`). Only supports `=`. If this filter is not set, the
+ // search is performed across all direct messages and spaces the user has
+ // access to as a space member.
+ // - `space.display_name`: Supports the operator `:` (has) and filters spaces
+ // based on a partial match of their display name. Results are limited to
+ // the top five space matches. For example, `space.display_name:Project`
+ // searches for messages in the top five spaces that contain the word
+ // "Project" in their display names.
+ // - `attachment`: Supports the operator `:*` (has any) to check for the
+ // presence of attachments. If `attachment:*` is specified, only messages
+ // that have at least one attachment are returned.
+ // - `annotations.user_mentions.user.name`: The resource name of the mentioned
+ // user (`users/{user}`). Only supports `:` (has). For example:
+ // `annotations.user_mentions.user.name:"users/1234567890"` returns only
+ // messages that contain a mention to the specified user. Alternatively, the
+ // alias `me` can be used to filter for messages that mention the caller
+ // user, for example: `annotations.user_mentions.user.name:users/me`. You
+ // can also use the e-mail as an alias for `{user}`, for example,
+ // `users/example@gmail.com`.
+ //
+ // For advanced filtering, the following functions are also available:
+ //
+ // - `has_link()`: Returns only messages that have at least one hyperlink in
+ // the message text.
+ // - `is_unread()`: Filters out messages that have been read by the calling
+ // user.
+ //
+ // Using the `space.display_name` filter requires that the calling credentials
+ // include one of the following [authorization
+ // scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ //
+ // - `https://www.googleapis.com/auth/chat.spaces.readonly`
+ // - `https://www.googleapis.com/auth/chat.spaces`
+ //
+ // Using the `is_unread()` filter requires that the calling credentials
+ // include one of the following [authorization
+ // scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ //
+ // - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
+ // - `https://www.googleapis.com/auth/chat.users.readstate`
+ //
+ //
+ // Across different fields, only `AND` operators are supported. A valid
+ // example is `sender.name = "users/1234567890" AND is_unread()`. The word
+ // `AND` is optional and is implied if omitted. For example, `sender.name =
+ // "users/1234567890" is_unread()` is valid and is equivalent to the previous
+ // example. An invalid example is `sender.name = "users/1234567890" OR
+ // is_unread()` because `OR` is not supported between different fields.
+ //
+ // Among the same field:
+ //
+ // - `create_time` supports only `AND`, and can only be used to represent
+ // an interval, such as `create_time >= "2022-01-01T00:00:00+00:00" AND
+ // create_time < "2023-01-01T00:00:00+00:00"`.
+ // - `sender.name` supports only the `OR` operator, for example:
+ // `sender.name = "users/1234567890" OR sender.name = "users/0987654321"`.
+ // - `space.name` supports only the `OR` operator, for example:
+ // `space.name = "spaces/ABCDEFGH" OR space.name = "spaces/QWERTYUI"`.
+ // - `space.display_name` supports the operators `AND` and `OR`, but not a
+ // mix of both. For example:
+ // `space.display_name:Project AND space.display_name:Tasks` returns
+ // messages that are in spaces with display names containing both `Project`
+ // and `Tasks`, whereas
+ // `space.display_name:Project OR space.display_name:Tasks` returns messages
+ // that are in spaces with display names containing either `Project` or
+ // `Tasks` or both.
+ // - `annotations.user_mentions.user.name` supports the operators `AND` and
+ // `OR`, but not a mix of both. For example:
+ // `annotations.user_mentions.user.name:"users/1234567890" AND
+ // annotations.user_mentions.user.name:"users/0987654321"` returns only
+ // messages that mentions both users, whereas
+ // `annotations.user_mentions.user.name:"users/1234567890" OR
+ // annotations.user_mentions.user.name:"users/0987654321"` returns messages
+ // that mention either user or both.
+ //
+ // Parentheses are required to disambiguate operator precedence when combining
+ // `AND` and `OR` operators in the same query. For example:
+ // `(sender.name="users/me" OR sender.name="users/123456") AND is_unread()`.
+ // Otherwise, parentheses are optional.
+ //
+ // The following example queries are valid:
+ //
+ // ```
+ // "Pending reports" AND create_time >= "2023-01-01T00:00:00Z"
+ //
+ // sender.name = "users/example@gmail.com"
+ //
+ // annotations.user_mentions.user.name:"users/0987654321"
+ //
+ // attachment:* AND space.name = "spaces/ABCDEFGH"
+ //
+ // tasks AND is_unread() AND sender.name = "users/1234567890"
+ //
+ // "things to do" "urgent"
+ //
+ // (sender.name = "users/1234567890")
+ // AND (create_time < "2023-05-01T00:00:00Z")
+ //
+ // tasks AND space.name = "spaces/ABCDEFGH" AND has_link()
+ //
+ // "project one" is_unread()
+ //
+ // space.display_name:Project tasks
+ // ```
+ //
+ // The maximum query length is 1,000 characters.
+ //
+ // Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
+ // error.
+ string filter = 2 [(google.api.field_behavior) = REQUIRED];
+
+ // Optional. The maximum number of results to return. The service may return
+ // fewer than this value.
+ //
+ // If unspecified, at most 25 are returned.
+ //
+ // The maximum value is 100. If you use a value more than 100, it's
+ // automatically changed to 100.
+ int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. A token, received from the previous search messages call. Provide
+ // this parameter to retrieve the subsequent page.
+ //
+ // When paginating, all other parameters provided should match the call that
+ // provided the page token. Passing different values to the other parameters
+ // might lead to unexpected results.
+ string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. How the results list is ordered.
+ //
+ // Supported attributes to order by are:
+ //
+ // - `create_time`: Sorts the results by the time of the message creation.
+ // Default value.
+ // - `relevance`: Sorts the results by relevance.
+ // [Developer Preview](https://developers.google.com/workspace/preview).
+ //
+ // The default ordering is `create_time desc`. Only a single order per query
+ // (`create_time` or `relevance`) is supported. Only descending order (`desc`)
+ // is supported, and it must be specified after the order attribute.
+ string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. Specifies what kind of search results view to return. The default
+ // is `SEARCH_MESSAGES_VIEW_BASIC`.
+ SearchMessagesView view = 7 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Response message for searching messages.
+message SearchMessagesResponse {
+ // The list of search results that matched the query.
+ repeated SearchMessageResult results = 1;
+
+ // A token that can be used to retrieve the next page. If this field is empty,
+ // there are no subsequent pages.
+ string next_page_token = 2;
+}
+
+// A single result item from a message search.
+message SearchMessageResult {
+ // The matched message.
+ Message message = 1;
+
+ // Indicates if the matched message is read by the calling user.
+ //
+ // Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
+ // calling credentials include one of the following [authorization
+ // scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ //
+ // - `https://www.googleapis.com/auth/chat.users.readstate.readonly`
+ // - `https://www.googleapis.com/auth/chat.users.readstate`
+ optional bool read = 3;
+
+ // The mute setting of the calling user for the space where the message is
+ // posted. The caller app can use this information to decide how to process
+ // the message depending on whether the space is muted for the user or not.
+ //
+ // Only returned if the request view is `SEARCH_MESSAGES_VIEW_FULL` and the
+ // calling credentials include the following [authorization
+ // scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
+ //
+ // - `https://www.googleapis.com/auth/chat.users.spacesettings`
+ SpaceNotificationSetting.MuteSetting space_mute_setting = 4;
+}
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space.proto
index 4530c86093f3..3e01510ec32c 100644
--- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space.proto
+++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/space.proto
@@ -76,17 +76,20 @@ message Space {
// Reserved.
SPACE_THREADING_STATE_UNSPECIFIED = 0;
- // Named spaces that support message threads. When users respond to a
- // message, they can reply in-thread, which keeps their response in the
- // context of the original message.
+ // Spaces that support message threads. When users respond to a message,
+ // they can reply in-thread, which keeps their response in the context of
+ // the original message.
THREADED_MESSAGES = 2;
// Named spaces where the conversation is organized by topic. Topics and
// their replies are grouped together.
GROUPED_MESSAGES = 3;
- // Direct messages (DMs) between two people and group conversations between
- // 3 or more people.
+ // Spaces that don't support message threading. This space threading state
+ // is only used for special cases including:
+ //
+ // * Continuous meeting chat where threading is intentionally turned off.
+ // * Legacy group conversations that were created prior to 2022.
UNTHREADED_MESSAGES = 4;
}
diff --git a/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/searchmessages/AsyncSearchMessages.java b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/searchmessages/AsyncSearchMessages.java
new file mode 100644
index 000000000000..2f107a6d6f6d
--- /dev/null
+++ b/java-chat/samples/snippets/generated/com/google/chat/v1/chatservice/searchmessages/AsyncSearchMessages.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.chat.v1.samples;
+
+// [START chat_v1_generated_ChatService_SearchMessages_async]
+import com.google.api.core.ApiFuture;
+import com.google.chat.v1.ChatServiceClient;
+import com.google.chat.v1.SearchMessageResult;
+import com.google.chat.v1.SearchMessagesRequest;
+import com.google.chat.v1.SpaceName;
+
+public class AsyncSearchMessages {
+
+ public static void main(String[] args) throws Exception {
+ asyncSearchMessages();
+ }
+
+ public static void asyncSearchMessages() throws Exception {
+ // This snippet has been automatically generated and should be regarded as a code template only.
+ // It will require modifications to work:
+ // - It may require correct/in-range values for request initialization.
+ // - It may require specifying regional endpoints when creating the service client as shown in
+ // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ try (ChatServiceClient chatServiceClient = ChatServiceClient.create()) {
+ SearchMessagesRequest request =
+ SearchMessagesRequest.newBuilder()
+ .setParent(SpaceName.of("[SPACE]").toString())
+ .setFilter("filter-1274492040")
+ .setPageSize(883849137)
+ .setPageToken("pageToken873572522")
+ .setOrderBy("orderBy-1207110587")
+ .build();
+ ApiFuture
+ * Optional. Additional contract value that the customer is legally
+ * obligated to spend on the product over the duration of the offer.
+ *
+ *
+ *
+ * .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue additional_contract_value = 13 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the additionalContractValue field is set.
+ */
+ boolean hasAdditionalContractValue();
+
+ /**
+ *
+ *
+ *
+ * Optional. Additional contract value that the customer is legally
+ * obligated to spend on the product over the duration of the offer.
+ *
+ *
+ *
+ * .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue additional_contract_value = 13 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The additionalContractValue.
+ */
+ com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue
+ getAdditionalContractValue();
+
+ /**
+ *
+ *
+ *
+ * Optional. Additional contract value that the customer is legally
+ * obligated to spend on the product over the duration of the offer.
+ *
+ *
+ *
+ * .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue additional_contract_value = 13 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValueOrBuilder
+ getAdditionalContractValueOrBuilder();
+
com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AmendedOfferCase
getAmendedOfferCase();
@@ -26027,125 +26076,1873 @@ public com.google.protobuf.Parser
+ * Optional. The absolute, cumulative contract value of the customer's
+ * spend obligation that is added on top of the automatically billed fees
+ * from Google. This amount is not automatically billed or invoiced by
+ * Google; instead, it is tracked as a legal spend guarantee to be met via
+ * usage reporting and manually trued-up by partners.
+ *
+ * The overall total contract value of the offer is calculated as the
+ * sum of Google-billed fees (from installments), plus this additional
+ * contract value.
+ *
+ * For amendments, this field must be set to the new cumulative
+ * additional total.
+ *
+ * For example:
+ *
+ * * Initial Offer: 3 installments of $15 (total $45 billed by Google)
+ * plus an `additional_contract_value` of $100 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the offer is $145 ($45 + $100).
+ * * Amended Offer: 6 installments of $15 (total $90 billed by Google)
+ * plus an `additional_contract_value` of $70 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the amended offer is $160
+ * ($90 + $70).
+ *
+ * Must be non-negative. The maximum allowed value is 1,000,000,000 USD.
+ *
+ *
+ * .google.type.Money contract_value = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the contractValue field is set.
+ */
+ boolean hasContractValue();
- public enum AmendedOfferCase
- implements
- com.google.protobuf.Internal.EnumLite,
- com.google.protobuf.AbstractMessage.InternalOneOfEnum {
- AMENDED_PRIVATE_OFFER(3),
- AMENDED_STANDARD_OFFER(4),
- AMENDEDOFFER_NOT_SET(0);
- private final int value;
+ /**
+ *
+ *
+ *
+ * Optional. The absolute, cumulative contract value of the customer's
+ * spend obligation that is added on top of the automatically billed fees
+ * from Google. This amount is not automatically billed or invoiced by
+ * Google; instead, it is tracked as a legal spend guarantee to be met via
+ * usage reporting and manually trued-up by partners.
+ *
+ * The overall total contract value of the offer is calculated as the
+ * sum of Google-billed fees (from installments), plus this additional
+ * contract value.
+ *
+ * For amendments, this field must be set to the new cumulative
+ * additional total.
+ *
+ * For example:
+ *
+ * * Initial Offer: 3 installments of $15 (total $45 billed by Google)
+ * plus an `additional_contract_value` of $100 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the offer is $145 ($45 + $100).
+ * * Amended Offer: 6 installments of $15 (total $90 billed by Google)
+ * plus an `additional_contract_value` of $70 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the amended offer is $160
+ * ($90 + $70).
+ *
+ * Must be non-negative. The maximum allowed value is 1,000,000,000 USD.
+ *
+ *
+ * .google.type.Money contract_value = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The contractValue.
+ */
+ com.google.type.Money getContractValue();
- private AmendedOfferCase(int value) {
- this.value = value;
- }
+ /**
+ *
+ *
+ *
+ * Optional. The absolute, cumulative contract value of the customer's
+ * spend obligation that is added on top of the automatically billed fees
+ * from Google. This amount is not automatically billed or invoiced by
+ * Google; instead, it is tracked as a legal spend guarantee to be met via
+ * usage reporting and manually trued-up by partners.
+ *
+ * The overall total contract value of the offer is calculated as the
+ * sum of Google-billed fees (from installments), plus this additional
+ * contract value.
+ *
+ * For amendments, this field must be set to the new cumulative
+ * additional total.
+ *
+ * For example:
+ *
+ * * Initial Offer: 3 installments of $15 (total $45 billed by Google)
+ * plus an `additional_contract_value` of $100 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the offer is $145 ($45 + $100).
+ * * Amended Offer: 6 installments of $15 (total $90 billed by Google)
+ * plus an `additional_contract_value` of $70 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the amended offer is $160
+ * ($90 + $70).
+ *
+ * Must be non-negative. The maximum allowed value is 1,000,000,000 USD.
+ *
+ *
+ * .google.type.Money contract_value = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.type.MoneyOrBuilder getContractValueOrBuilder();
/**
- * @param value The number of the enum to look for.
- * @return The enum associated with the given number.
- * @deprecated Use {@link #forNumber(int)} instead.
+ *
+ *
+ *
+ * Optional. The resource names of the SKUs whose tracked usage is
+ * eligible to contribute toward satisfying this additional contract value
+ * obligation.
+ *
+ * This list explicitly separates core spend obligations from exclusions
+ * like overage fees, which do not count toward meeting the customer's
+ * legal spend commitment.
+ *
+ * Must be non-empty for the offer to be published.
+ *
+ * Format:
+ * projects/{project}/locations/{location}/services/{service}/skus/{sku}
+ *
+ *
+ *
+ * repeated string eligible_skus = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return A list containing the eligibleSkus.
*/
- @java.lang.Deprecated
- public static AmendedOfferCase valueOf(int value) {
- return forNumber(value);
- }
+ java.util.List
+ * Optional. The resource names of the SKUs whose tracked usage is
+ * eligible to contribute toward satisfying this additional contract value
+ * obligation.
+ *
+ * This list explicitly separates core spend obligations from exclusions
+ * like overage fees, which do not count toward meeting the customer's
+ * legal spend commitment.
+ *
+ * Must be non-empty for the offer to be published.
+ *
+ * Format:
+ * projects/{project}/locations/{location}/services/{service}/skus/{sku}
+ *
+ *
+ *
+ * repeated string eligible_skus = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The count of eligibleSkus.
+ */
+ int getEligibleSkusCount();
- public int getNumber() {
- return this.value;
- }
- };
+ /**
+ *
+ *
+ *
+ * Optional. The resource names of the SKUs whose tracked usage is
+ * eligible to contribute toward satisfying this additional contract value
+ * obligation.
+ *
+ * This list explicitly separates core spend obligations from exclusions
+ * like overage fees, which do not count toward meeting the customer's
+ * legal spend commitment.
+ *
+ * Must be non-empty for the offer to be published.
+ *
+ * Format:
+ * projects/{project}/locations/{location}/services/{service}/skus/{sku}
+ *
+ *
+ *
+ * repeated string eligible_skus = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index of the element to return.
+ * @return The eligibleSkus at the given index.
+ */
+ java.lang.String getEligibleSkus(int index);
- public AmendedOfferCase getAmendedOfferCase() {
- return AmendedOfferCase.forNumber(amendedOfferCase_);
+ /**
+ *
+ *
+ *
+ * Optional. The resource names of the SKUs whose tracked usage is
+ * eligible to contribute toward satisfying this additional contract value
+ * obligation.
+ *
+ * This list explicitly separates core spend obligations from exclusions
+ * like overage fees, which do not count toward meeting the customer's
+ * legal spend commitment.
+ *
+ * Must be non-empty for the offer to be published.
+ *
+ * Format:
+ * projects/{project}/locations/{location}/services/{service}/skus/{sku}
+ *
+ *
+ *
+ * repeated string eligible_skus = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the eligibleSkus at the given index.
+ */
+ com.google.protobuf.ByteString getEligibleSkusBytes(int index);
}
- private int priceCase_ = 0;
-
- @SuppressWarnings("serial")
- private java.lang.Object price_;
-
- public enum PriceCase
+ /**
+ *
+ *
+ *
+ * Additional contract value that represents a spend obligation or target
+ * contract value tracked out-of-band by the partner.
+ *
+ *
+ * Protobuf type {@code
+ * google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue}
+ */
+ public static final class AdditionalContractValue extends com.google.protobuf.GeneratedMessage
implements
- com.google.protobuf.Internal.EnumLite,
- com.google.protobuf.AbstractMessage.InternalOneOfEnum {
- STANDARD_INTERVAL_PRICE(5),
- CUSTOM_INTERVAL_PRICE(6),
- PRICE_NOT_SET(0);
- private final int value;
+ // @@protoc_insertion_point(message_implements:google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue)
+ AdditionalContractValueOrBuilder {
+ private static final long serialVersionUID = 0L;
- private PriceCase(int value) {
- this.value = value;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 33,
+ /* patch= */ 6,
+ /* suffix= */ "",
+ "AdditionalContractValue");
}
- /**
- * @param value The number of the enum to look for.
- * @return The enum associated with the given number.
- * @deprecated Use {@link #forNumber(int)} instead.
- */
- @java.lang.Deprecated
- public static PriceCase valueOf(int value) {
- return forNumber(value);
+ // Use AdditionalContractValue.newBuilder() to construct.
+ private AdditionalContractValue(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
}
- public static PriceCase forNumber(int value) {
- switch (value) {
- case 5:
- return STANDARD_INTERVAL_PRICE;
- case 6:
- return CUSTOM_INTERVAL_PRICE;
- case 0:
- return PRICE_NOT_SET;
- default:
- return null;
- }
+ private AdditionalContractValue() {
+ eligibleSkus_ = com.google.protobuf.LazyStringArrayList.emptyList();
}
- public int getNumber() {
- return this.value;
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.commerceproducer.v1beta.PrivateOfferProto
+ .internal_static_google_cloud_commerceproducer_v1beta_PrivateOffer_SingleProductOffer_AdditionalContractValue_descriptor;
}
- };
- public PriceCase getPriceCase() {
- return PriceCase.forNumber(priceCase_);
- }
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.commerceproducer.v1beta.PrivateOfferProto
+ .internal_static_google_cloud_commerceproducer_v1beta_PrivateOffer_SingleProductOffer_AdditionalContractValue_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue.class,
+ com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue.Builder.class);
+ }
- public static final int AMENDED_PRIVATE_OFFER_FIELD_NUMBER = 3;
+ private int bitField0_;
+ public static final int CONTRACT_VALUE_FIELD_NUMBER = 1;
+ private com.google.type.Money contractValue_;
- /**
- *
- *
- *
- * Optional. An existing private offer that will be superseded by this
- * offer. Unless the private offer is for a product type that supports
- * [multiple active
- * orders](https://cloud.google.com/marketplace/docs/partners/offers/multiple-offers),
- * an amendment private offer must be transacted if and only if the
- * destination customer billing account already contains an active order
- * for the same product. The offer to be superseded must be the offer
- * associated with an active order.
- *
- * Amendments generally fall into one of two scenarios:
- *
- * 1. **Active Order / Ended Offer**: The term of the amended offer has
+ /**
+ *
+ *
+ *
*
+ *
+ * Optional. The absolute, cumulative contract value of the customer's
+ * spend obligation that is added on top of the automatically billed fees
+ * from Google. This amount is not automatically billed or invoiced by
+ * Google; instead, it is tracked as a legal spend guarantee to be met via
+ * usage reporting and manually trued-up by partners.
+ *
+ * The overall total contract value of the offer is calculated as the
+ * sum of Google-billed fees (from installments), plus this additional
+ * contract value.
+ *
+ * For amendments, this field must be set to the new cumulative
+ * additional total.
+ *
+ * For example:
+ *
+ * * Initial Offer: 3 installments of $15 (total $45 billed by Google)
+ * plus an `additional_contract_value` of $100 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the offer is $145 ($45 + $100).
+ * * Amended Offer: 6 installments of $15 (total $90 billed by Google)
+ * plus an `additional_contract_value` of $70 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the amended offer is $160
+ * ($90 + $70).
+ *
+ * Must be non-negative. The maximum allowed value is 1,000,000,000 USD.
+ *
+ *
+ * .google.type.Money contract_value = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the contractValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasContractValue() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The absolute, cumulative contract value of the customer's
+ * spend obligation that is added on top of the automatically billed fees
+ * from Google. This amount is not automatically billed or invoiced by
+ * Google; instead, it is tracked as a legal spend guarantee to be met via
+ * usage reporting and manually trued-up by partners.
+ *
+ * The overall total contract value of the offer is calculated as the
+ * sum of Google-billed fees (from installments), plus this additional
+ * contract value.
+ *
+ * For amendments, this field must be set to the new cumulative
+ * additional total.
+ *
+ * For example:
+ *
+ * * Initial Offer: 3 installments of $15 (total $45 billed by Google)
+ * plus an `additional_contract_value` of $100 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the offer is $145 ($45 + $100).
+ * * Amended Offer: 6 installments of $15 (total $90 billed by Google)
+ * plus an `additional_contract_value` of $70 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the amended offer is $160
+ * ($90 + $70).
+ *
+ * Must be non-negative. The maximum allowed value is 1,000,000,000 USD.
+ *
+ *
+ * .google.type.Money contract_value = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The contractValue.
+ */
+ @java.lang.Override
+ public com.google.type.Money getContractValue() {
+ return contractValue_ == null ? com.google.type.Money.getDefaultInstance() : contractValue_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The absolute, cumulative contract value of the customer's
+ * spend obligation that is added on top of the automatically billed fees
+ * from Google. This amount is not automatically billed or invoiced by
+ * Google; instead, it is tracked as a legal spend guarantee to be met via
+ * usage reporting and manually trued-up by partners.
+ *
+ * The overall total contract value of the offer is calculated as the
+ * sum of Google-billed fees (from installments), plus this additional
+ * contract value.
+ *
+ * For amendments, this field must be set to the new cumulative
+ * additional total.
+ *
+ * For example:
+ *
+ * * Initial Offer: 3 installments of $15 (total $45 billed by Google)
+ * plus an `additional_contract_value` of $100 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the offer is $145 ($45 + $100).
+ * * Amended Offer: 6 installments of $15 (total $90 billed by Google)
+ * plus an `additional_contract_value` of $70 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the amended offer is $160
+ * ($90 + $70).
+ *
+ * Must be non-negative. The maximum allowed value is 1,000,000,000 USD.
+ *
+ *
+ * .google.type.Money contract_value = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.type.MoneyOrBuilder getContractValueOrBuilder() {
+ return contractValue_ == null ? com.google.type.Money.getDefaultInstance() : contractValue_;
+ }
+
+ public static final int ELIGIBLE_SKUS_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private com.google.protobuf.LazyStringArrayList eligibleSkus_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+
+ /**
+ *
+ *
+ *
+ * Optional. The resource names of the SKUs whose tracked usage is
+ * eligible to contribute toward satisfying this additional contract value
+ * obligation.
+ *
+ * This list explicitly separates core spend obligations from exclusions
+ * like overage fees, which do not count toward meeting the customer's
+ * legal spend commitment.
+ *
+ * Must be non-empty for the offer to be published.
+ *
+ * Format:
+ * projects/{project}/locations/{location}/services/{service}/skus/{sku}
+ *
+ *
+ *
+ * repeated string eligible_skus = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return A list containing the eligibleSkus.
+ */
+ public com.google.protobuf.ProtocolStringList getEligibleSkusList() {
+ return eligibleSkus_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The resource names of the SKUs whose tracked usage is
+ * eligible to contribute toward satisfying this additional contract value
+ * obligation.
+ *
+ * This list explicitly separates core spend obligations from exclusions
+ * like overage fees, which do not count toward meeting the customer's
+ * legal spend commitment.
+ *
+ * Must be non-empty for the offer to be published.
+ *
+ * Format:
+ * projects/{project}/locations/{location}/services/{service}/skus/{sku}
+ *
+ *
+ *
+ * repeated string eligible_skus = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The count of eligibleSkus.
+ */
+ public int getEligibleSkusCount() {
+ return eligibleSkus_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The resource names of the SKUs whose tracked usage is
+ * eligible to contribute toward satisfying this additional contract value
+ * obligation.
+ *
+ * This list explicitly separates core spend obligations from exclusions
+ * like overage fees, which do not count toward meeting the customer's
+ * legal spend commitment.
+ *
+ * Must be non-empty for the offer to be published.
+ *
+ * Format:
+ * projects/{project}/locations/{location}/services/{service}/skus/{sku}
+ *
+ *
+ *
+ * repeated string eligible_skus = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index of the element to return.
+ * @return The eligibleSkus at the given index.
+ */
+ public java.lang.String getEligibleSkus(int index) {
+ return eligibleSkus_.get(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The resource names of the SKUs whose tracked usage is
+ * eligible to contribute toward satisfying this additional contract value
+ * obligation.
+ *
+ * This list explicitly separates core spend obligations from exclusions
+ * like overage fees, which do not count toward meeting the customer's
+ * legal spend commitment.
+ *
+ * Must be non-empty for the offer to be published.
+ *
+ * Format:
+ * projects/{project}/locations/{location}/services/{service}/skus/{sku}
+ *
+ *
+ *
+ * repeated string eligible_skus = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the eligibleSkus at the given index.
+ */
+ public com.google.protobuf.ByteString getEligibleSkusBytes(int index) {
+ return eligibleSkus_.getByteString(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(1, getContractValue());
+ }
+ for (int i = 0; i < eligibleSkus_.size(); i++) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 2, eligibleSkus_.getRaw(i));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContractValue());
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < eligibleSkus_.size(); i++) {
+ dataSize += computeStringSizeNoTag(eligibleSkus_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getEligibleSkusList().size();
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj
+ instanceof
+ com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ other =
+ (com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue)
+ obj;
+
+ if (hasContractValue() != other.hasContractValue()) return false;
+ if (hasContractValue()) {
+ if (!getContractValue().equals(other.getContractValue())) return false;
+ }
+ if (!getEligibleSkusList().equals(other.getEligibleSkusList())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasContractValue()) {
+ hash = (37 * hash) + CONTRACT_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + getContractValue().hashCode();
+ }
+ if (getEligibleSkusCount() > 0) {
+ hash = (37 * hash) + ELIGIBLE_SKUS_FIELD_NUMBER;
+ hash = (53 * hash) + getEligibleSkusList().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ *
+ * Additional contract value that represents a spend obligation or target
+ * contract value tracked out-of-band by the partner.
+ *
+ *
+ * Protobuf type {@code
+ * google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessage.Builder
+ * Optional. The absolute, cumulative contract value of the customer's
+ * spend obligation that is added on top of the automatically billed fees
+ * from Google. This amount is not automatically billed or invoiced by
+ * Google; instead, it is tracked as a legal spend guarantee to be met via
+ * usage reporting and manually trued-up by partners.
+ *
+ * The overall total contract value of the offer is calculated as the
+ * sum of Google-billed fees (from installments), plus this additional
+ * contract value.
+ *
+ * For amendments, this field must be set to the new cumulative
+ * additional total.
+ *
+ * For example:
+ *
+ * * Initial Offer: 3 installments of $15 (total $45 billed by Google)
+ * plus an `additional_contract_value` of $100 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the offer is $145 ($45 + $100).
+ * * Amended Offer: 6 installments of $15 (total $90 billed by Google)
+ * plus an `additional_contract_value` of $70 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the amended offer is $160
+ * ($90 + $70).
+ *
+ * Must be non-negative. The maximum allowed value is 1,000,000,000 USD.
+ *
+ *
+ * .google.type.Money contract_value = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the contractValue field is set.
+ */
+ public boolean hasContractValue() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The absolute, cumulative contract value of the customer's
+ * spend obligation that is added on top of the automatically billed fees
+ * from Google. This amount is not automatically billed or invoiced by
+ * Google; instead, it is tracked as a legal spend guarantee to be met via
+ * usage reporting and manually trued-up by partners.
+ *
+ * The overall total contract value of the offer is calculated as the
+ * sum of Google-billed fees (from installments), plus this additional
+ * contract value.
+ *
+ * For amendments, this field must be set to the new cumulative
+ * additional total.
+ *
+ * For example:
+ *
+ * * Initial Offer: 3 installments of $15 (total $45 billed by Google)
+ * plus an `additional_contract_value` of $100 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the offer is $145 ($45 + $100).
+ * * Amended Offer: 6 installments of $15 (total $90 billed by Google)
+ * plus an `additional_contract_value` of $70 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the amended offer is $160
+ * ($90 + $70).
+ *
+ * Must be non-negative. The maximum allowed value is 1,000,000,000 USD.
+ *
+ *
+ * .google.type.Money contract_value = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The contractValue.
+ */
+ public com.google.type.Money getContractValue() {
+ if (contractValueBuilder_ == null) {
+ return contractValue_ == null
+ ? com.google.type.Money.getDefaultInstance()
+ : contractValue_;
+ } else {
+ return contractValueBuilder_.getMessage();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The absolute, cumulative contract value of the customer's
+ * spend obligation that is added on top of the automatically billed fees
+ * from Google. This amount is not automatically billed or invoiced by
+ * Google; instead, it is tracked as a legal spend guarantee to be met via
+ * usage reporting and manually trued-up by partners.
+ *
+ * The overall total contract value of the offer is calculated as the
+ * sum of Google-billed fees (from installments), plus this additional
+ * contract value.
+ *
+ * For amendments, this field must be set to the new cumulative
+ * additional total.
+ *
+ * For example:
+ *
+ * * Initial Offer: 3 installments of $15 (total $45 billed by Google)
+ * plus an `additional_contract_value` of $100 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the offer is $145 ($45 + $100).
+ * * Amended Offer: 6 installments of $15 (total $90 billed by Google)
+ * plus an `additional_contract_value` of $70 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the amended offer is $160
+ * ($90 + $70).
+ *
+ * Must be non-negative. The maximum allowed value is 1,000,000,000 USD.
+ *
+ *
+ * .google.type.Money contract_value = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setContractValue(com.google.type.Money value) {
+ if (contractValueBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ contractValue_ = value;
+ } else {
+ contractValueBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The absolute, cumulative contract value of the customer's
+ * spend obligation that is added on top of the automatically billed fees
+ * from Google. This amount is not automatically billed or invoiced by
+ * Google; instead, it is tracked as a legal spend guarantee to be met via
+ * usage reporting and manually trued-up by partners.
+ *
+ * The overall total contract value of the offer is calculated as the
+ * sum of Google-billed fees (from installments), plus this additional
+ * contract value.
+ *
+ * For amendments, this field must be set to the new cumulative
+ * additional total.
+ *
+ * For example:
+ *
+ * * Initial Offer: 3 installments of $15 (total $45 billed by Google)
+ * plus an `additional_contract_value` of $100 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the offer is $145 ($45 + $100).
+ * * Amended Offer: 6 installments of $15 (total $90 billed by Google)
+ * plus an `additional_contract_value` of $70 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the amended offer is $160
+ * ($90 + $70).
+ *
+ * Must be non-negative. The maximum allowed value is 1,000,000,000 USD.
+ *
+ *
+ * .google.type.Money contract_value = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setContractValue(com.google.type.Money.Builder builderForValue) {
+ if (contractValueBuilder_ == null) {
+ contractValue_ = builderForValue.build();
+ } else {
+ contractValueBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The absolute, cumulative contract value of the customer's
+ * spend obligation that is added on top of the automatically billed fees
+ * from Google. This amount is not automatically billed or invoiced by
+ * Google; instead, it is tracked as a legal spend guarantee to be met via
+ * usage reporting and manually trued-up by partners.
+ *
+ * The overall total contract value of the offer is calculated as the
+ * sum of Google-billed fees (from installments), plus this additional
+ * contract value.
+ *
+ * For amendments, this field must be set to the new cumulative
+ * additional total.
+ *
+ * For example:
+ *
+ * * Initial Offer: 3 installments of $15 (total $45 billed by Google)
+ * plus an `additional_contract_value` of $100 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the offer is $145 ($45 + $100).
+ * * Amended Offer: 6 installments of $15 (total $90 billed by Google)
+ * plus an `additional_contract_value` of $70 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the amended offer is $160
+ * ($90 + $70).
+ *
+ * Must be non-negative. The maximum allowed value is 1,000,000,000 USD.
+ *
+ *
+ * .google.type.Money contract_value = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeContractValue(com.google.type.Money value) {
+ if (contractValueBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)
+ && contractValue_ != null
+ && contractValue_ != com.google.type.Money.getDefaultInstance()) {
+ getContractValueBuilder().mergeFrom(value);
+ } else {
+ contractValue_ = value;
+ }
+ } else {
+ contractValueBuilder_.mergeFrom(value);
+ }
+ if (contractValue_ != null) {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The absolute, cumulative contract value of the customer's
+ * spend obligation that is added on top of the automatically billed fees
+ * from Google. This amount is not automatically billed or invoiced by
+ * Google; instead, it is tracked as a legal spend guarantee to be met via
+ * usage reporting and manually trued-up by partners.
+ *
+ * The overall total contract value of the offer is calculated as the
+ * sum of Google-billed fees (from installments), plus this additional
+ * contract value.
+ *
+ * For amendments, this field must be set to the new cumulative
+ * additional total.
+ *
+ * For example:
+ *
+ * * Initial Offer: 3 installments of $15 (total $45 billed by Google)
+ * plus an `additional_contract_value` of $100 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the offer is $145 ($45 + $100).
+ * * Amended Offer: 6 installments of $15 (total $90 billed by Google)
+ * plus an `additional_contract_value` of $70 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the amended offer is $160
+ * ($90 + $70).
+ *
+ * Must be non-negative. The maximum allowed value is 1,000,000,000 USD.
+ *
+ *
+ * .google.type.Money contract_value = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearContractValue() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ contractValue_ = null;
+ if (contractValueBuilder_ != null) {
+ contractValueBuilder_.dispose();
+ contractValueBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The absolute, cumulative contract value of the customer's
+ * spend obligation that is added on top of the automatically billed fees
+ * from Google. This amount is not automatically billed or invoiced by
+ * Google; instead, it is tracked as a legal spend guarantee to be met via
+ * usage reporting and manually trued-up by partners.
+ *
+ * The overall total contract value of the offer is calculated as the
+ * sum of Google-billed fees (from installments), plus this additional
+ * contract value.
+ *
+ * For amendments, this field must be set to the new cumulative
+ * additional total.
+ *
+ * For example:
+ *
+ * * Initial Offer: 3 installments of $15 (total $45 billed by Google)
+ * plus an `additional_contract_value` of $100 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the offer is $145 ($45 + $100).
+ * * Amended Offer: 6 installments of $15 (total $90 billed by Google)
+ * plus an `additional_contract_value` of $70 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the amended offer is $160
+ * ($90 + $70).
+ *
+ * Must be non-negative. The maximum allowed value is 1,000,000,000 USD.
+ *
+ *
+ * .google.type.Money contract_value = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.type.Money.Builder getContractValueBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return internalGetContractValueFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The absolute, cumulative contract value of the customer's
+ * spend obligation that is added on top of the automatically billed fees
+ * from Google. This amount is not automatically billed or invoiced by
+ * Google; instead, it is tracked as a legal spend guarantee to be met via
+ * usage reporting and manually trued-up by partners.
+ *
+ * The overall total contract value of the offer is calculated as the
+ * sum of Google-billed fees (from installments), plus this additional
+ * contract value.
+ *
+ * For amendments, this field must be set to the new cumulative
+ * additional total.
+ *
+ * For example:
+ *
+ * * Initial Offer: 3 installments of $15 (total $45 billed by Google)
+ * plus an `additional_contract_value` of $100 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the offer is $145 ($45 + $100).
+ * * Amended Offer: 6 installments of $15 (total $90 billed by Google)
+ * plus an `additional_contract_value` of $70 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the amended offer is $160
+ * ($90 + $70).
+ *
+ * Must be non-negative. The maximum allowed value is 1,000,000,000 USD.
+ *
+ *
+ * .google.type.Money contract_value = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.type.MoneyOrBuilder getContractValueOrBuilder() {
+ if (contractValueBuilder_ != null) {
+ return contractValueBuilder_.getMessageOrBuilder();
+ } else {
+ return contractValue_ == null
+ ? com.google.type.Money.getDefaultInstance()
+ : contractValue_;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The absolute, cumulative contract value of the customer's
+ * spend obligation that is added on top of the automatically billed fees
+ * from Google. This amount is not automatically billed or invoiced by
+ * Google; instead, it is tracked as a legal spend guarantee to be met via
+ * usage reporting and manually trued-up by partners.
+ *
+ * The overall total contract value of the offer is calculated as the
+ * sum of Google-billed fees (from installments), plus this additional
+ * contract value.
+ *
+ * For amendments, this field must be set to the new cumulative
+ * additional total.
+ *
+ * For example:
+ *
+ * * Initial Offer: 3 installments of $15 (total $45 billed by Google)
+ * plus an `additional_contract_value` of $100 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the offer is $145 ($45 + $100).
+ * * Amended Offer: 6 installments of $15 (total $90 billed by Google)
+ * plus an `additional_contract_value` of $70 (billed by Partner, with
+ * true-ups happening at the end of the offer's term).
+ * The overall total contract value of the amended offer is $160
+ * ($90 + $70).
+ *
+ * Must be non-negative. The maximum allowed value is 1,000,000,000 USD.
+ *
+ *
+ * .google.type.Money contract_value = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.type.Money,
+ com.google.type.Money.Builder,
+ com.google.type.MoneyOrBuilder>
+ internalGetContractValueFieldBuilder() {
+ if (contractValueBuilder_ == null) {
+ contractValueBuilder_ =
+ new com.google.protobuf.SingleFieldBuilder<
+ com.google.type.Money,
+ com.google.type.Money.Builder,
+ com.google.type.MoneyOrBuilder>(
+ getContractValue(), getParentForChildren(), isClean());
+ contractValue_ = null;
+ }
+ return contractValueBuilder_;
+ }
+
+ private com.google.protobuf.LazyStringArrayList eligibleSkus_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+
+ private void ensureEligibleSkusIsMutable() {
+ if (!eligibleSkus_.isModifiable()) {
+ eligibleSkus_ = new com.google.protobuf.LazyStringArrayList(eligibleSkus_);
+ }
+ bitField0_ |= 0x00000002;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The resource names of the SKUs whose tracked usage is
+ * eligible to contribute toward satisfying this additional contract value
+ * obligation.
+ *
+ * This list explicitly separates core spend obligations from exclusions
+ * like overage fees, which do not count toward meeting the customer's
+ * legal spend commitment.
+ *
+ * Must be non-empty for the offer to be published.
+ *
+ * Format:
+ * projects/{project}/locations/{location}/services/{service}/skus/{sku}
+ *
+ *
+ *
+ * repeated string eligible_skus = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return A list containing the eligibleSkus.
+ */
+ public com.google.protobuf.ProtocolStringList getEligibleSkusList() {
+ eligibleSkus_.makeImmutable();
+ return eligibleSkus_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The resource names of the SKUs whose tracked usage is
+ * eligible to contribute toward satisfying this additional contract value
+ * obligation.
+ *
+ * This list explicitly separates core spend obligations from exclusions
+ * like overage fees, which do not count toward meeting the customer's
+ * legal spend commitment.
+ *
+ * Must be non-empty for the offer to be published.
+ *
+ * Format:
+ * projects/{project}/locations/{location}/services/{service}/skus/{sku}
+ *
+ *
+ *
+ * repeated string eligible_skus = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The count of eligibleSkus.
+ */
+ public int getEligibleSkusCount() {
+ return eligibleSkus_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The resource names of the SKUs whose tracked usage is
+ * eligible to contribute toward satisfying this additional contract value
+ * obligation.
+ *
+ * This list explicitly separates core spend obligations from exclusions
+ * like overage fees, which do not count toward meeting the customer's
+ * legal spend commitment.
+ *
+ * Must be non-empty for the offer to be published.
+ *
+ * Format:
+ * projects/{project}/locations/{location}/services/{service}/skus/{sku}
+ *
+ *
+ *
+ * repeated string eligible_skus = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index of the element to return.
+ * @return The eligibleSkus at the given index.
+ */
+ public java.lang.String getEligibleSkus(int index) {
+ return eligibleSkus_.get(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The resource names of the SKUs whose tracked usage is
+ * eligible to contribute toward satisfying this additional contract value
+ * obligation.
+ *
+ * This list explicitly separates core spend obligations from exclusions
+ * like overage fees, which do not count toward meeting the customer's
+ * legal spend commitment.
+ *
+ * Must be non-empty for the offer to be published.
+ *
+ * Format:
+ * projects/{project}/locations/{location}/services/{service}/skus/{sku}
+ *
+ *
+ *
+ * repeated string eligible_skus = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the eligibleSkus at the given index.
+ */
+ public com.google.protobuf.ByteString getEligibleSkusBytes(int index) {
+ return eligibleSkus_.getByteString(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The resource names of the SKUs whose tracked usage is
+ * eligible to contribute toward satisfying this additional contract value
+ * obligation.
+ *
+ * This list explicitly separates core spend obligations from exclusions
+ * like overage fees, which do not count toward meeting the customer's
+ * legal spend commitment.
+ *
+ * Must be non-empty for the offer to be published.
+ *
+ * Format:
+ * projects/{project}/locations/{location}/services/{service}/skus/{sku}
+ *
+ *
+ *
+ * repeated string eligible_skus = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index to set the value at.
+ * @param value The eligibleSkus to set.
+ * @return This builder for chaining.
+ */
+ public Builder setEligibleSkus(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureEligibleSkusIsMutable();
+ eligibleSkus_.set(index, value);
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The resource names of the SKUs whose tracked usage is
+ * eligible to contribute toward satisfying this additional contract value
+ * obligation.
+ *
+ * This list explicitly separates core spend obligations from exclusions
+ * like overage fees, which do not count toward meeting the customer's
+ * legal spend commitment.
+ *
+ * Must be non-empty for the offer to be published.
+ *
+ * Format:
+ * projects/{project}/locations/{location}/services/{service}/skus/{sku}
+ *
+ *
+ *
+ * repeated string eligible_skus = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The eligibleSkus to add.
+ * @return This builder for chaining.
+ */
+ public Builder addEligibleSkus(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureEligibleSkusIsMutable();
+ eligibleSkus_.add(value);
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The resource names of the SKUs whose tracked usage is
+ * eligible to contribute toward satisfying this additional contract value
+ * obligation.
+ *
+ * This list explicitly separates core spend obligations from exclusions
+ * like overage fees, which do not count toward meeting the customer's
+ * legal spend commitment.
+ *
+ * Must be non-empty for the offer to be published.
+ *
+ * Format:
+ * projects/{project}/locations/{location}/services/{service}/skus/{sku}
+ *
+ *
+ *
+ * repeated string eligible_skus = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param values The eligibleSkus to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllEligibleSkus(java.lang.Iterable
+ * Optional. The resource names of the SKUs whose tracked usage is
+ * eligible to contribute toward satisfying this additional contract value
+ * obligation.
+ *
+ * This list explicitly separates core spend obligations from exclusions
+ * like overage fees, which do not count toward meeting the customer's
+ * legal spend commitment.
+ *
+ * Must be non-empty for the offer to be published.
+ *
+ * Format:
+ * projects/{project}/locations/{location}/services/{service}/skus/{sku}
+ *
+ *
+ *
+ * repeated string eligible_skus = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearEligibleSkus() {
+ eligibleSkus_ = com.google.protobuf.LazyStringArrayList.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ ;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. The resource names of the SKUs whose tracked usage is
+ * eligible to contribute toward satisfying this additional contract value
+ * obligation.
+ *
+ * This list explicitly separates core spend obligations from exclusions
+ * like overage fees, which do not count toward meeting the customer's
+ * legal spend commitment.
+ *
+ * Must be non-empty for the offer to be published.
+ *
+ * Format:
+ * projects/{project}/locations/{location}/services/{service}/skus/{sku}
+ *
+ *
+ *
+ * repeated string eligible_skus = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The bytes of the eligibleSkus to add.
+ * @return This builder for chaining.
+ */
+ public Builder addEligibleSkusBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureEligibleSkusIsMutable();
+ eligibleSkus_.add(value);
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue)
+ private static final com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue();
+ }
+
+ public static com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Optional. An existing private offer that will be superseded by this
+ * offer. Unless the private offer is for a product type that supports
+ * [multiple active
+ * orders](https://cloud.google.com/marketplace/docs/partners/offers/multiple-offers),
+ * an amendment private offer must be transacted if and only if the
+ * destination customer billing account already contains an active order
+ * for the same product. The offer to be superseded must be the offer
+ * associated with an active order.
+ *
+ * Amendments generally fall into one of two scenarios:
+ *
+ * 1. **Active Order / Ended Offer**: The term of the amended offer has
* ended but it is still associated with an active order. The new
* offer must amend the ended private offer.
* 2. **Active Order / Active Offer**: The term of the amended offer is
@@ -27193,6 +28990,76 @@ public boolean hasRevenueShare() {
: revenueShare_;
}
+ public static final int ADDITIONAL_CONTRACT_VALUE_FIELD_NUMBER = 13;
+ private com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ additionalContractValue_;
+
+ /**
+ *
+ *
+ *
+ * Optional. Additional contract value that the customer is legally
+ * obligated to spend on the product over the duration of the offer.
+ *
+ *
+ *
+ * .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue additional_contract_value = 13 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the additionalContractValue field is set.
+ */
+ @java.lang.Override
+ public boolean hasAdditionalContractValue() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Additional contract value that the customer is legally
+ * obligated to spend on the product over the duration of the offer.
+ *
+ *
+ *
+ * .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue additional_contract_value = 13 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The additionalContractValue.
+ */
+ @java.lang.Override
+ public com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ getAdditionalContractValue() {
+ return additionalContractValue_ == null
+ ? com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue.getDefaultInstance()
+ : additionalContractValue_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Additional contract value that the customer is legally
+ * obligated to spend on the product over the duration of the offer.
+ *
+ *
+ *
+ * .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue additional_contract_value = 13 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValueOrBuilder
+ getAdditionalContractValueOrBuilder() {
+ return additionalContractValue_ == null
+ ? com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue.getDefaultInstance()
+ : additionalContractValue_;
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -27248,6 +29115,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(12, getRevenueShare());
}
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeMessage(13, getAdditionalContractValue());
+ }
getUnknownFields().writeTo(output);
}
@@ -27303,6 +29173,11 @@ public int getSerializedSize() {
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getRevenueShare());
}
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 13, getAdditionalContractValue());
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -27335,6 +29210,10 @@ public boolean equals(final java.lang.Object obj) {
if (hasRevenueShare()) {
if (!getRevenueShare().equals(other.getRevenueShare())) return false;
}
+ if (hasAdditionalContractValue() != other.hasAdditionalContractValue()) return false;
+ if (hasAdditionalContractValue()) {
+ if (!getAdditionalContractValue().equals(other.getAdditionalContractValue())) return false;
+ }
if (!getAmendedOfferCase().equals(other.getAmendedOfferCase())) return false;
switch (amendedOfferCase_) {
case 3:
@@ -27390,6 +29269,10 @@ public int hashCode() {
hash = (37 * hash) + REVENUE_SHARE_FIELD_NUMBER;
hash = (53 * hash) + getRevenueShare().hashCode();
}
+ if (hasAdditionalContractValue()) {
+ hash = (37 * hash) + ADDITIONAL_CONTRACT_VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + getAdditionalContractValue().hashCode();
+ }
switch (amendedOfferCase_) {
case 3:
hash = (37 * hash) + AMENDED_PRIVATE_OFFER_FIELD_NUMBER;
@@ -27568,6 +29451,7 @@ private void maybeForceBuilderInitialization() {
internalGetEffectiveInstallmentTimelineFieldBuilder();
internalGetContractValueFieldBuilder();
internalGetRevenueShareFieldBuilder();
+ internalGetAdditionalContractValueFieldBuilder();
}
}
@@ -27608,6 +29492,11 @@ public Builder clear() {
revenueShareBuilder_.dispose();
revenueShareBuilder_ = null;
}
+ additionalContractValue_ = null;
+ if (additionalContractValueBuilder_ != null) {
+ additionalContractValueBuilder_.dispose();
+ additionalContractValueBuilder_ = null;
+ }
amendedOfferCase_ = 0;
amendedOffer_ = null;
priceCase_ = 0;
@@ -27698,6 +29587,13 @@ private void buildPartial0(
revenueShareBuilder_ == null ? revenueShare_ : revenueShareBuilder_.build();
to_bitField0_ |= 0x00000002;
}
+ if (((from_bitField0_ & 0x00000800) != 0)) {
+ result.additionalContractValue_ =
+ additionalContractValueBuilder_ == null
+ ? additionalContractValue_
+ : additionalContractValueBuilder_.build();
+ to_bitField0_ |= 0x00000004;
+ }
result.bitField0_ |= to_bitField0_;
}
@@ -27808,6 +29704,9 @@ public Builder mergeFrom(
if (other.hasRevenueShare()) {
mergeRevenueShare(other.getRevenueShare());
}
+ if (other.hasAdditionalContractValue()) {
+ mergeAdditionalContractValue(other.getAdditionalContractValue());
+ }
switch (other.getAmendedOfferCase()) {
case AMENDED_PRIVATE_OFFER:
{
@@ -27964,6 +29863,14 @@ public Builder mergeFrom(
bitField0_ |= 0x00000400;
break;
} // case 98
+ case 106:
+ {
+ input.readMessage(
+ internalGetAdditionalContractValueFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000800;
+ break;
+ } // case 106
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -31256,6 +33163,257 @@ public Builder clearRevenueShare() {
return revenueShareBuilder_;
}
+ private com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ additionalContractValue_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue,
+ com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue.Builder,
+ com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValueOrBuilder>
+ additionalContractValueBuilder_;
+
+ /**
+ *
+ *
+ *
+ * Optional. Additional contract value that the customer is legally
+ * obligated to spend on the product over the duration of the offer.
+ *
+ *
+ *
+ * .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue additional_contract_value = 13 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the additionalContractValue field is set.
+ */
+ public boolean hasAdditionalContractValue() {
+ return ((bitField0_ & 0x00000800) != 0);
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Additional contract value that the customer is legally
+ * obligated to spend on the product over the duration of the offer.
+ *
+ *
+ *
+ * .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue additional_contract_value = 13 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The additionalContractValue.
+ */
+ public com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ getAdditionalContractValue() {
+ if (additionalContractValueBuilder_ == null) {
+ return additionalContractValue_ == null
+ ? com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue.getDefaultInstance()
+ : additionalContractValue_;
+ } else {
+ return additionalContractValueBuilder_.getMessage();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Additional contract value that the customer is legally
+ * obligated to spend on the product over the duration of the offer.
+ *
+ *
+ *
+ * .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue additional_contract_value = 13 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setAdditionalContractValue(
+ com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ value) {
+ if (additionalContractValueBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ additionalContractValue_ = value;
+ } else {
+ additionalContractValueBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000800;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Additional contract value that the customer is legally
+ * obligated to spend on the product over the duration of the offer.
+ *
+ *
+ *
+ * .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue additional_contract_value = 13 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setAdditionalContractValue(
+ com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue.Builder
+ builderForValue) {
+ if (additionalContractValueBuilder_ == null) {
+ additionalContractValue_ = builderForValue.build();
+ } else {
+ additionalContractValueBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000800;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Additional contract value that the customer is legally
+ * obligated to spend on the product over the duration of the offer.
+ *
+ *
+ *
+ * .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue additional_contract_value = 13 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeAdditionalContractValue(
+ com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue
+ value) {
+ if (additionalContractValueBuilder_ == null) {
+ if (((bitField0_ & 0x00000800) != 0)
+ && additionalContractValue_ != null
+ && additionalContractValue_
+ != com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue.getDefaultInstance()) {
+ getAdditionalContractValueBuilder().mergeFrom(value);
+ } else {
+ additionalContractValue_ = value;
+ }
+ } else {
+ additionalContractValueBuilder_.mergeFrom(value);
+ }
+ if (additionalContractValue_ != null) {
+ bitField0_ |= 0x00000800;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Additional contract value that the customer is legally
+ * obligated to spend on the product over the duration of the offer.
+ *
+ *
+ *
+ * .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue additional_contract_value = 13 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearAdditionalContractValue() {
+ bitField0_ = (bitField0_ & ~0x00000800);
+ additionalContractValue_ = null;
+ if (additionalContractValueBuilder_ != null) {
+ additionalContractValueBuilder_.dispose();
+ additionalContractValueBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Additional contract value that the customer is legally
+ * obligated to spend on the product over the duration of the offer.
+ *
+ *
+ *
+ * .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue additional_contract_value = 13 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue.Builder
+ getAdditionalContractValueBuilder() {
+ bitField0_ |= 0x00000800;
+ onChanged();
+ return internalGetAdditionalContractValueFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Additional contract value that the customer is legally
+ * obligated to spend on the product over the duration of the offer.
+ *
+ *
+ *
+ * .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue additional_contract_value = 13 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValueOrBuilder
+ getAdditionalContractValueOrBuilder() {
+ if (additionalContractValueBuilder_ != null) {
+ return additionalContractValueBuilder_.getMessageOrBuilder();
+ } else {
+ return additionalContractValue_ == null
+ ? com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue.getDefaultInstance()
+ : additionalContractValue_;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional. Additional contract value that the customer is legally
+ * obligated to spend on the product over the duration of the offer.
+ *
+ *
+ *
+ * .google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer.AdditionalContractValue additional_contract_value = 13 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue,
+ com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue.Builder,
+ com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValueOrBuilder>
+ internalGetAdditionalContractValueFieldBuilder() {
+ if (additionalContractValueBuilder_ == null) {
+ additionalContractValueBuilder_ =
+ new com.google.protobuf.SingleFieldBuilder<
+ com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue,
+ com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValue.Builder,
+ com.google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer
+ .AdditionalContractValueOrBuilder>(
+ getAdditionalContractValue(), getParentForChildren(), isClean());
+ additionalContractValue_ = null;
+ }
+ return additionalContractValueBuilder_;
+ }
+
// @@protoc_insertion_point(builder_scope:google.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOffer)
}
diff --git a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/PrivateOfferProto.java b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/PrivateOfferProto.java
index 3a30c2053665..54df338c53ba 100644
--- a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/PrivateOfferProto.java
+++ b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/PrivateOfferProto.java
@@ -112,6 +112,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_cloud_commerceproducer_v1beta_PrivateOffer_SingleProductOffer_RevenueShare_descriptor;
static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_google_cloud_commerceproducer_v1beta_PrivateOffer_SingleProductOffer_RevenueShare_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_commerceproducer_v1beta_PrivateOffer_SingleProductOffer_AdditionalContractValue_descriptor;
+ static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_google_cloud_commerceproducer_v1beta_PrivateOffer_SingleProductOffer_AdditionalContractValue_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_cloud_commerceproducer_v1beta_PrivateOfferDocument_descriptor;
static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
@@ -130,7 +134,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "eproducer.v1beta\032\037google/api/field_behav"
+ "ior.proto\032\031google/api/resource.proto\032\037go"
+ "ogle/protobuf/timestamp.proto\032\032google/ty"
- + "pe/datetime.proto\032\031google/type/decimal.proto\032\027google/type/money.proto\"\364.\n"
+ + "pe/datetime.proto\032\031google/type/decimal.proto\032\027google/type/money.proto\"\2151\n"
+ "\014PrivateOffer\022j\n"
+ "\024single_product_offer\030\014 \001(\0132E.g"
+ "oogle.cloud.commerceproducer.v1beta.PrivateOffer.SingleProductOfferB\003\340A\001H\000\022\021\n"
@@ -202,7 +206,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\022SCHEDULED_END_TIME\020\002\022\027\n"
+ "\023MATCH_AMENDED_OFFER\020\003B\021\n"
+ "\017end_policy_dataB\t\n"
- + "\007renewal\032\375\030\n"
+ + "\007renewal\032\226\033\n"
+ "\022SingleProductOffer\022U\n"
+ "\025amended_private_offer\030\003 \001(\tB4\340A\001\372A.\n"
+ ",commerceproducer.googleapis.com/PrivateOfferH\000\022W\n"
@@ -227,17 +231,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\016contract_value\030\013 \001(\0132S.google.cloud"
+ ".commerceproducer.v1beta.PrivateOffer.SingleProductOffer.ContractValueB\003\340A\003\022n\n\r"
+ "revenue_share\030\014 \001(\0132R.google.cloud.commer"
- + "ceproducer.v1beta.PrivateOffer.SingleProductOffer.RevenueShareB\003\340A\003\0328\n"
+ + "ceproducer.v1beta.PrivateOffer.SingleProductOffer.RevenueShareB\003\340A\003\022\205\001\n"
+ + "\031additional_contract_value\030\r"
+ + " \001(\0132].google.cloud.commerceproducer.v1beta.PrivateOffer.Sing"
+ + "leProductOffer.AdditionalContractValueB\003\340A\001\0328\n"
+ "\007Feature\022\031\n"
+ "\014display_name\030\001 \001(\tB\003\340A\001\022\022\n"
+ "\005value\030\002 \001(\tB\003\340A\001\032\210\010\n\n"
+ "PriceModel\022q\n"
- + "\010flat_fee\030\002 \001(\0132X.google.cloud.commerceproducer.v1beta.Pr"
- + "ivateOffer.SingleProductOffer.PriceModel.FlatFeeB\003\340A\001H\000\022v\n\n"
- + "commitment\030\003 \001(\0132[.google.cloud.commerceproducer.v1beta.Priva"
- + "teOffer.SingleProductOffer.PriceModel.CommitmentB\003\340A\001H\000\022j\n"
- + "\005usage\030\001 \001(\0132V.google.cloud.commerceproducer.v1beta.PrivateOff"
- + "er.SingleProductOffer.PriceModel.UsageB\003\340A\001\032\270\001\n"
+ + "\010flat_fee\030\002 \001(\0132X.google.cloud.commercepr"
+ + "oducer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.FlatFeeB\003\340A\001H\000\022v\n\n"
+ + "commitment\030\003 \001(\0132[.google.cloud.commerceprodu"
+ + "cer.v1beta.PrivateOffer.SingleProductOffer.PriceModel.CommitmentB\003\340A\001H\000\022j\n"
+ + "\005usage\030\001 \001(\0132V.google.cloud.commerceproducer.v"
+ + "1beta.PrivateOffer.SingleProductOffer.PriceModel.UsageB\003\340A\001\032\270\001\n"
+ "\013SkuDiscount\022:\n"
+ "\003sku\030\001 \001(\tB+\340A\001\372A%\n"
+ "#commerceproducer.googleapis.com/SkuH\000\022 \n"
@@ -248,9 +255,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\010discount\032\276\001\n"
+ "\005Usage\022;\n"
+ "\030default_discount_percent\030\001"
- + " \001(\0132\024.google.type.DecimalB\003\340A\001\022x\n\r"
- + "sku_discounts\030\002 \003(\0132\\.google.cloud.commerceproducer.v1b"
- + "eta.PrivateOffer.SingleProductOffer.PriceModel.SkuDiscountB\003\340A\001\032=\n"
+ + " \001(\0132\024.google.type.DecimalB\003\340A\001\022x\n"
+ + "\r"
+ + "sku_discounts\030\002 \003(\0132\\.google.cloud.comm"
+ + "erceproducer.v1beta.PrivateOffer.SingleP"
+ + "roductOffer.PriceModel.SkuDiscountB\003\340A\001\032=\n"
+ "\007FlatFee\0222\n"
+ "\021flat_fee_override\030\001"
+ " \001(\0132\022.google.type.MoneyB\003\340A\001\032\327\001\n\n"
@@ -261,11 +270,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\037discard_previous_credit_balance\030\004 \001(\010B\003\340A\001B\016\n"
+ "\014subscription\032\310\003\n"
+ "\025StandardIntervalPrice\022\214\001\n"
- + "\021standard_interval\030\001 \001(\0162l.google.cloud.commercepr"
- + "oducer.v1beta.PrivateOffer.SingleProduct"
- + "Offer.StandardIntervalPrice.StandardIntervalB\003\340A\001\022j\n"
- + "\013price_model\030\002 \001(\0132P.google.cloud.commerceproducer.v1beta.PrivateOff"
- + "er.SingleProductOffer.PriceModelB\003\340A\001\"\263\001\n"
+ + "\021standard_interval\030\001 \001(\0162l.google."
+ + "cloud.commerceproducer.v1beta.PrivateOff"
+ + "er.SingleProductOffer.StandardIntervalPrice.StandardIntervalB\003\340A\001\022j\n"
+ + "\013price_model\030\002 \001(\0132P.google.cloud.commerceproducer.v"
+ + "1beta.PrivateOffer.SingleProductOffer.PriceModelB\003\340A\001\"\263\001\n"
+ "\020StandardInterval\022!\n"
+ "\035STANDARD_INTERVAL_UNSPECIFIED\020\000\022\027\n"
+ "\017MONTHLY_POSTPAY\020\001\032\002\010\001\022\024\n"
@@ -275,11 +284,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\023YEARLY_NOT_PRORATED\020\005\032\251\001\n"
+ "\013Installment\022.\n\n"
+ "start_time\030\001 \001(\0132\025.google.type.DateTimeB\003\340A\001\022j\n"
- + "\013price_model\030\002 \001(\0132P.google.cloud."
- + "commerceproducer.v1beta.PrivateOffer.SingleProductOffer.PriceModelB\003\340A\001\032\203\001\n"
+ + "\013price_model\030\002 \001(\0132P.google.cloud.commerceproducer.v1beta."
+ + "PrivateOffer.SingleProductOffer.PriceModelB\003\340A\001\032\203\001\n"
+ "\023CustomIntervalPrice\022l\n"
- + "\014installments\030\001 \003(\0132Q.google.cloud.commerceproducer.v1beta.Pri"
- + "vateOffer.SingleProductOffer.InstallmentB\003\340A\001\032F\n\r"
+ + "\014installments\030\001 \003(\0132Q.google.cloud.commercepro"
+ + "ducer.v1beta.PrivateOffer.SingleProductOffer.InstallmentB\003\340A\001\032F\n\r"
+ "ContractValue\0225\n"
+ "\024total_contract_value\030\001"
+ " \001(\0132\022.google.type.MoneyB\003\340A\003\032\246\001\n"
@@ -287,7 +296,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\'current_term_vendor_net_revenue_percent\030\001"
+ " \001(\0132\024.google.type.DecimalB\003\340A\003\022J\n"
+ "\'renewal_term_vendor_net_revenue_percent\030\002"
- + " \001(\0132\024.google.type.DecimalB\003\340A\003B\017\n\r"
+ + " \001(\0132\024.google.type.DecimalB\003\340A\003\032\216\001\n"
+ + "\027AdditionalContractValue\022/\n"
+ + "\016contract_value\030\001 \001(\0132\022.google.type.MoneyB\003\340A\001\022B\n\r"
+ + "eligible_skus\030\002 \003(\tB+\340A\001\372A%\n"
+ + "#commerceproducer.googleapis.com/SkuB\017\n\r"
+ "amended_offerB\007\n"
+ "\005price\"}\n"
+ "\005State\022\025\n"
@@ -305,8 +318,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\tMIGRATION\020\002\022\022\n"
+ "\016NATIVE_RENEWAL\020\003\022\007\n"
+ "\003NEW\020\004:\226\001\352A\222\001\n"
- + ",commerceproducer.googleapis.com/Private"
- + "Offer\022Eprojects/{project}/locations/{location}/privateOffers/{private_offer}*\r"
+ + ",commerceproducer.googleapis.com/Privat"
+ + "eOffer\022Eprojects/{project}/locations/{location}/privateOffers/{private_offer}*\r"
+ "privateOffers2\014privateOfferB\t\n"
+ "\007content\"\310\005\n"
+ "\024PrivateOfferDocument\022\035\n"
@@ -315,8 +328,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\013create_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n"
+ "\013update_time\030\003"
+ " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022c\n\r"
- + "document_type\030\004 \001(\0162G.google.cloud.commerceproducer.v1bet"
- + "a.PrivateOfferDocument.DocumentTypeB\003\340A\002\022\026\n"
+ + "document_type\030\004 \001(\0162G.google.cloud.commerceproducer.v1be"
+ + "ta.PrivateOfferDocument.DocumentTypeB\003\340A\002\022\026\n"
+ "\tmime_type\030\005 \001(\tB\003\340A\001\"\303\001\n"
+ "\014DocumentType\022\035\n"
+ "\031DOCUMENT_TYPE_UNSPECIFIED\020\000\022%\n"
@@ -324,14 +337,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\021STATEMENT_OF_WORK\020\002\022*\n"
+ "&STANDARD_END_USER_LICENSE_AGREEMENT_V1\020\003\022*\n"
+ "&STANDARD_END_USER_LICENSE_AGREEMENT_V2\020\004:\303\001\352A\277\001\n"
- + "4commerceproducer.googleapis.com/PrivateOfferDocum"
- + "ent\022Zprojects/{project}/locations/{location}/privateOffers/{private_offer}/docum"
- + "ents/{document}*\025privateOfferDocuments2\024privateOfferDocumentB\t\n"
- + "\007contentB\346\001\n"
- + "(com.google.cloud.commerceproducer.v1betaB\021Pr"
- + "ivateOfferProtoP\001ZTcloud.google.com/go/commerceproducer/apiv1beta/commerceproduc"
- + "erpb;commerceproducerpb\252\002$Google.Cloud.C"
- + "ommerceProducer.V1Beta\352\002\'Google::Cloud::CommerceProducer::V1betab\006proto3"
+ + "4commerceproducer.googleapis.com/PrivateOfferDocu"
+ + "ment\022Zprojects/{project}/locations/{location}/privateOffers/{private_offer}/docu"
+ + "ments/{document}*\025privateOfferDocuments2\024privateOfferDocumentB\t\n"
+ + "\007contentB\215\002\n"
+ + "(com.google.cloud.commerceproducer.v1betaB\021P"
+ + "rivateOfferProtoP\001ZTcloud.google.com/go/commerceproducer/apiv1beta/commerceprodu"
+ + "cerpb;commerceproducerpb\252\002$Google.Cloud."
+ + "CommerceProducer.V1Beta\312\002$Google\\Cloud\\C"
+ + "ommerceProducer\\V1beta\352\002\'Google::Cloud::CommerceProducer::V1betab\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -444,6 +458,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"EffectiveInstallmentTimeline",
"ContractValue",
"RevenueShare",
+ "AdditionalContractValue",
"AmendedOffer",
"Price",
});
@@ -549,6 +564,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new java.lang.String[] {
"CurrentTermVendorNetRevenuePercent", "RenewalTermVendorNetRevenuePercent",
});
+ internal_static_google_cloud_commerceproducer_v1beta_PrivateOffer_SingleProductOffer_AdditionalContractValue_descriptor =
+ internal_static_google_cloud_commerceproducer_v1beta_PrivateOffer_SingleProductOffer_descriptor
+ .getNestedType(7);
+ internal_static_google_cloud_commerceproducer_v1beta_PrivateOffer_SingleProductOffer_AdditionalContractValue_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_google_cloud_commerceproducer_v1beta_PrivateOffer_SingleProductOffer_AdditionalContractValue_descriptor,
+ new java.lang.String[] {
+ "ContractValue", "EligibleSkus",
+ });
internal_static_google_cloud_commerceproducer_v1beta_PrivateOfferDocument_descriptor =
getDescriptor().getMessageType(1);
internal_static_google_cloud_commerceproducer_v1beta_PrivateOfferDocument_fieldAccessorTable =
diff --git a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/ServiceProto.java b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/ServiceProto.java
index 75805a30c4dc..1a82223197c6 100644
--- a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/ServiceProto.java
+++ b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/ServiceProto.java
@@ -60,11 +60,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\004name\030\001 \001(\tB\003\340A\010\022\022\n"
+ "\005title\030\002 \001(\tB\003\340A\003:{\352Ax\n"
+ "\'commerceproducer.googleapis.com/Service\022:projects/{project}/locations/{l"
- + "ocation}/services/{service}*\010services2\007serviceB\341\001\n"
+ + "ocation}/services/{service}*\010services2\007serviceB\210\002\n"
+ "(com.google.cloud.commerceproducer.v1betaB\014ServiceProtoP\001ZTcloud.googl"
+ "e.com/go/commerceproducer/apiv1beta/commerceproducerpb;commerceproducerpb\252\002$Goog"
- + "le.Cloud.CommerceProducer.V1Beta\352\002\'Googl"
- + "e::Cloud::CommerceProducer::V1betab\006proto3"
+ + "le.Cloud.CommerceProducer.V1Beta\312\002$Googl"
+ + "e\\Cloud\\CommerceProducer\\V1beta\352\002\'Google"
+ + "::Cloud::CommerceProducer::V1betab\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
diff --git a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/SkuGroupProto.java b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/SkuGroupProto.java
index d1eb89c96859..9aef4cc7724a 100644
--- a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/SkuGroupProto.java
+++ b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/SkuGroupProto.java
@@ -63,12 +63,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\022cloud_billing_skus\030\003 \003(\tB\003\340A\003:\201\001\352A~\n"
+ "(commerceproducer.googleapis.com/S"
+ "kuGroup\022=projects/{project}/locations/{location}/skuGroups/{sku_group}*"
- + "\tskuGroups2\010skuGroupB\342\001\n"
+ + "\tskuGroups2\010skuGroupB\211\002\n"
+ "(com.google.cloud.commerceproducer.v1betaB\r"
+ "SkuGroupProtoP\001ZTcloud.google.com/go/commerceproducer/apiv1bet"
+ "a/commerceproducerpb;commerceproducerpb\252"
- + "\002$Google.Cloud.CommerceProducer.V1Beta\352\002"
- + "\'Google::Cloud::CommerceProducer::V1betab\006proto3"
+ + "\002$Google.Cloud.CommerceProducer.V1Beta\312\002"
+ + "$Google\\Cloud\\CommerceProducer\\V1beta\352\002\'"
+ + "Google::Cloud::CommerceProducer::V1betab\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
diff --git a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/SkuProto.java b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/SkuProto.java
index 5de664cf8171..265a1bb62f83 100644
--- a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/SkuProto.java
+++ b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/SkuProto.java
@@ -326,10 +326,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\010locationB\n\n"
+ "\010sku_type:z\352Aw\n"
+ "#commerceproducer.googleapis.com/Sku\022Eprojects/{project}/locations/{location}/ser"
- + "vices/{service}/skus/{sku}*\004skus2\003skuB\335\001\n"
+ + "vices/{service}/skus/{sku}*\004skus2\003skuB\204\002\n"
+ "(com.google.cloud.commerceproducer.v1betaB\010SkuProtoP\001ZTcloud.google.com/go/comm"
+ "erceproducer/apiv1beta/commerceproducerpb;commerceproducerpb\252\002$Google.Cloud.Comm"
- + "erceProducer.V1Beta\352\002\'Google::Cloud::CommerceProducer::V1betab\006proto3"
+ + "erceProducer.V1Beta\312\002$Google\\Cloud\\Comme"
+ + "rceProducer\\V1beta\352\002\'Google::Cloud::CommerceProducer::V1betab\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
diff --git a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/StandardOfferProto.java b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/StandardOfferProto.java
index 5d50c1297010..07453b30e2b1 100644
--- a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/StandardOfferProto.java
+++ b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/java/com/google/cloud/commerceproducer/v1beta/StandardOfferProto.java
@@ -115,11 +115,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "locations/{location}/services/{service}/"
+ "standardOffers/{standard_offer}*\016standardOffers2\r"
+ "standardOfferB\006\n"
- + "\004termB\347\001\n"
+ + "\004termB\216\002\n"
+ "(com.google.cloud.commerceproducer.v1betaB\022Sta"
+ "ndardOfferProtoP\001ZTcloud.google.com/go/commerceproducer/apiv1beta/commerceproduc"
+ "erpb;commerceproducerpb\252\002$Google.Cloud.C"
- + "ommerceProducer.V1Beta\352\002\'Google::Cloud::CommerceProducer::V1betab\006proto3"
+ + "ommerceProducer.V1Beta\312\002$Google\\Cloud\\Co"
+ + "mmerceProducer\\V1beta\352\002\'Google::Cloud::CommerceProducer::V1betab\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
diff --git a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/commerce_transaction.proto b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/commerce_transaction.proto
index 96ae241c66df..8204238e0db9 100644
--- a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/commerce_transaction.proto
+++ b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/commerce_transaction.proto
@@ -33,6 +33,7 @@ option go_package = "cloud.google.com/go/commerceproducer/apiv1beta/commerceprod
option java_multiple_files = true;
option java_outer_classname = "CommerceTransactionProto";
option java_package = "com.google.cloud.commerceproducer.v1beta";
+option php_namespace = "Google\\Cloud\\CommerceProducer\\V1beta";
option ruby_package = "Google::Cloud::CommerceProducer::V1beta";
// APIs related to managing resources that model commercial transactions.
diff --git a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/private_offer.proto b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/private_offer.proto
index b029e21ede31..f8351241b757 100644
--- a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/private_offer.proto
+++ b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/private_offer.proto
@@ -28,6 +28,7 @@ option go_package = "cloud.google.com/go/commerceproducer/apiv1beta/commerceprod
option java_multiple_files = true;
option java_outer_classname = "PrivateOfferProto";
option java_package = "com.google.cloud.commerceproducer.v1beta";
+option php_namespace = "Google\\Cloud\\CommerceProducer\\V1beta";
option ruby_package = "Google::Cloud::CommerceProducer::V1beta";
// Message describing PrivateOffer resource.
@@ -725,6 +726,58 @@ message PrivateOffer {
[(google.api.field_behavior) = OUTPUT_ONLY];
}
+ // Additional contract value that represents a spend obligation or target
+ // contract value tracked out-of-band by the partner.
+ message AdditionalContractValue {
+ // Optional. The absolute, cumulative contract value of the customer's
+ // spend obligation that is added on top of the automatically billed fees
+ // from Google. This amount is not automatically billed or invoiced by
+ // Google; instead, it is tracked as a legal spend guarantee to be met via
+ // usage reporting and manually trued-up by partners.
+ //
+ // The overall total contract value of the offer is calculated as the
+ // sum of Google-billed fees (from installments), plus this additional
+ // contract value.
+ //
+ // For amendments, this field must be set to the new cumulative
+ // additional total.
+ //
+ // For example:
+ //
+ // * Initial Offer: 3 installments of $15 (total $45 billed by Google)
+ // plus an `additional_contract_value` of $100 (billed by Partner, with
+ // true-ups happening at the end of the offer's term).
+ // The overall total contract value of the offer is $145 ($45 + $100).
+ // * Amended Offer: 6 installments of $15 (total $90 billed by Google)
+ // plus an `additional_contract_value` of $70 (billed by Partner, with
+ // true-ups happening at the end of the offer's term).
+ // The overall total contract value of the amended offer is $160
+ // ($90 + $70).
+ //
+ // Must be non-negative. The maximum allowed value is 1,000,000,000 USD.
+ google.type.Money contract_value = 1
+ [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The resource names of the SKUs whose tracked usage is
+ // eligible to contribute toward satisfying this additional contract value
+ // obligation.
+ //
+ // This list explicitly separates core spend obligations from exclusions
+ // like overage fees, which do not count toward meeting the customer's
+ // legal spend commitment.
+ //
+ // Must be non-empty for the offer to be published.
+ //
+ // Format:
+ // projects/{project}/locations/{location}/services/{service}/skus/{sku}
+ repeated string eligible_skus = 2 [
+ (google.api.field_behavior) = OPTIONAL,
+ (google.api.resource_reference) = {
+ type: "commerceproducer.googleapis.com/Sku"
+ }
+ ];
+ }
+
// An existing offer to be superseded by this private offer.
oneof amended_offer {
// Optional. An existing private offer that will be superseded by this
@@ -874,6 +927,11 @@ message PrivateOffer {
// Output only. Revenue share information for this Private Offer.
// Not included for `PRIVATE_OFFER_VIEW_BASIC`.
RevenueShare revenue_share = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ // Optional. Additional contract value that the customer is legally
+ // obligated to spend on the product over the duration of the offer.
+ AdditionalContractValue additional_contract_value = 13
+ [(google.api.field_behavior) = OPTIONAL];
}
// State of an offer.
diff --git a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/service.proto b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/service.proto
index e8e708cc7965..cf3dbf0735fc 100644
--- a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/service.proto
+++ b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/service.proto
@@ -24,6 +24,7 @@ option go_package = "cloud.google.com/go/commerceproducer/apiv1beta/commerceprod
option java_multiple_files = true;
option java_outer_classname = "ServiceProto";
option java_package = "com.google.cloud.commerceproducer.v1beta";
+option php_namespace = "Google\\Cloud\\CommerceProducer\\V1beta";
option ruby_package = "Google::Cloud::CommerceProducer::V1beta";
// Message describing Service resource.
diff --git a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/sku.proto b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/sku.proto
index 2f01db5244ef..a28a57eb366d 100644
--- a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/sku.proto
+++ b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/sku.proto
@@ -28,6 +28,7 @@ option go_package = "cloud.google.com/go/commerceproducer/apiv1beta/commerceprod
option java_multiple_files = true;
option java_outer_classname = "SkuProto";
option java_package = "com.google.cloud.commerceproducer.v1beta";
+option php_namespace = "Google\\Cloud\\CommerceProducer\\V1beta";
option ruby_package = "Google::Cloud::CommerceProducer::V1beta";
// Message describing the Sku resource.
diff --git a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/sku_group.proto b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/sku_group.proto
index 657ea1d2452d..cdf1456f1467 100644
--- a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/sku_group.proto
+++ b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/sku_group.proto
@@ -24,6 +24,7 @@ option go_package = "cloud.google.com/go/commerceproducer/apiv1beta/commerceprod
option java_multiple_files = true;
option java_outer_classname = "SkuGroupProto";
option java_package = "com.google.cloud.commerceproducer.v1beta";
+option php_namespace = "Google\\Cloud\\CommerceProducer\\V1beta";
option ruby_package = "Google::Cloud::CommerceProducer::V1beta";
// Message describing SkuGroup resource
diff --git a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/standard_offer.proto b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/standard_offer.proto
index aff0b60cce1f..cd11008bfe7a 100644
--- a/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/standard_offer.proto
+++ b/java-commerceproducer/proto-google-cloud-commerceproducer-v1beta/src/main/proto/google/cloud/commerceproducer/v1beta/standard_offer.proto
@@ -25,6 +25,7 @@ option go_package = "cloud.google.com/go/commerceproducer/apiv1beta/commerceprod
option java_multiple_files = true;
option java_outer_classname = "StandardOfferProto";
option java_package = "com.google.cloud.commerceproducer.v1beta";
+option php_namespace = "Google\\Cloud\\CommerceProducer\\V1beta";
option ruby_package = "Google::Cloud::CommerceProducer::V1beta";
// Message describing the StandardOffer resource.
diff --git a/java-compute/README.md b/java-compute/README.md
index 71a45bd912bd..e405c4422316 100644
--- a/java-compute/README.md
+++ b/java-compute/README.md
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HostsClient hostsClient = HostsClient.create()) {
+ * String project = "project-309310695";
+ * String zone = "zone3744684";
+ * String association = "association-87499647";
+ * String host = "host3208616";
+ * Host response = hostsClient.get(project, zone, association, host);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HostsSettings hostsSettings =
+ * HostsSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * HostsClient hostsClient = HostsClient.create(hostsSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HostsSettings hostsSettings = HostsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * HostsClient hostsClient = HostsClient.create(hostsSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HostsClient hostsClient = HostsClient.create()) {
+ * String project = "project-309310695";
+ * String zone = "zone3744684";
+ * String association = "association-87499647";
+ * String host = "host3208616";
+ * Host response = hostsClient.get(project, zone, association, host);
+ * }
+ * }
+ *
+ * @param project The project ID for this request.
+ * @param zone The name of the zone for this request, formatted as RFC1035.
+ * @param association The parent resource association for the Host. This field specifies the
+ * hierarchical context (e.g., reservation, block, sub-block) when accessing the host. For
+ * example, reservations/reservation_name,
+ * reservations/reservation_name/reservationBlocks/reservation_block_name or
+ * reservations/reservation_name/reservationBlocks/reservation_block_name/reservationSubBlocks/reservation_sub_block_name.
+ * @param host The name of the host, formatted as RFC1035 or a resource ID number.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Host get(String project, String zone, String association, String host) {
+ GetHostRequest request =
+ GetHostRequest.newBuilder()
+ .setProject(project)
+ .setZone(zone)
+ .setAssociation(association)
+ .setHost(host)
+ .build();
+ return get(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves information about the specified host.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HostsClient hostsClient = HostsClient.create()) {
+ * GetHostRequest request =
+ * GetHostRequest.newBuilder()
+ * .setAssociation("association-87499647")
+ * .setHost("host3208616")
+ * .setProject("project-309310695")
+ * .setZone("zone3744684")
+ * .build();
+ * Host response = hostsClient.get(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Host get(GetHostRequest request) {
+ return getCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves information about the specified host.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HostsClient hostsClient = HostsClient.create()) {
+ * GetHostRequest request =
+ * GetHostRequest.newBuilder()
+ * .setAssociation("association-87499647")
+ * .setHost("host3208616")
+ * .setProject("project-309310695")
+ * .setZone("zone3744684")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HostsClient hostsClient = HostsClient.create()) {
+ * String project = "project-309310695";
+ * String zone = "zone3744684";
+ * String association = "association-87499647";
+ * String host = "host3208616";
+ * HostsGetVersionRequest hostsGetVersionRequestResource =
+ * HostsGetVersionRequest.newBuilder().build();
+ * Operation response =
+ * hostsClient
+ * .getVersionAsync(project, zone, association, host, hostsGetVersionRequestResource)
+ * .get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param zone Name of the zone for this request. Zone name should conform to RFC1035.
+ * @param association The parent resource association for the Host. This field specifies the
+ * hierarchical context (e.g., reservation, block, sub-block) when accessing the host.
+ * @param host The name of the host, formatted as RFC1035 or a resource ID number.
+ * @param hostsGetVersionRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HostsClient hostsClient = HostsClient.create()) {
+ * GetVersionHostRequest request =
+ * GetVersionHostRequest.newBuilder()
+ * .setAssociation("association-87499647")
+ * .setHost("host3208616")
+ * .setHostsGetVersionRequestResource(HostsGetVersionRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRequestId("requestId693933066")
+ * .setZone("zone3744684")
+ * .build();
+ * Operation response = hostsClient.getVersionAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HostsClient hostsClient = HostsClient.create()) {
+ * GetVersionHostRequest request =
+ * GetVersionHostRequest.newBuilder()
+ * .setAssociation("association-87499647")
+ * .setHost("host3208616")
+ * .setHostsGetVersionRequestResource(HostsGetVersionRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRequestId("requestId693933066")
+ * .setZone("zone3744684")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HostsClient hostsClient = HostsClient.create()) {
+ * GetVersionHostRequest request =
+ * GetVersionHostRequest.newBuilder()
+ * .setAssociation("association-87499647")
+ * .setHost("host3208616")
+ * .setHostsGetVersionRequestResource(HostsGetVersionRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setRequestId("requestId693933066")
+ * .setZone("zone3744684")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HostsClient hostsClient = HostsClient.create()) {
+ * String project = "project-309310695";
+ * String zone = "zone3744684";
+ * String association = "association-87499647";
+ * for (Host element : hostsClient.list(project, zone, association).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param project The project ID for this request.
+ * @param zone The name of the zone for this request, formatted as RFC1035.
+ * @param association The parent resource association for the Host. This field specifies the
+ * hierarchical context (e.g., reservation, block, sub-block) when accessing the host. For
+ * example, reservations/reservation_name,
+ * reservations/reservation_name/reservationBlocks/reservation_block_name or
+ * reservations/reservation_name/reservationBlocks/reservation_block_name/reservationSubBlocks/reservation_sub_block_name.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPagedResponse list(String project, String zone, String association) {
+ ListHostsRequest request =
+ ListHostsRequest.newBuilder()
+ .setProject(project)
+ .setZone(zone)
+ .setAssociation(association)
+ .build();
+ return list(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a list of hosts.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HostsClient hostsClient = HostsClient.create()) {
+ * ListHostsRequest request =
+ * ListHostsRequest.newBuilder()
+ * .setAssociation("association-87499647")
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setReturnPartialSuccess(true)
+ * .setZone("zone3744684")
+ * .build();
+ * for (Host element : hostsClient.list(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPagedResponse list(ListHostsRequest request) {
+ return listPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a list of hosts.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HostsClient hostsClient = HostsClient.create()) {
+ * ListHostsRequest request =
+ * ListHostsRequest.newBuilder()
+ * .setAssociation("association-87499647")
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setReturnPartialSuccess(true)
+ * .setZone("zone3744684")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HostsClient hostsClient = HostsClient.create()) {
+ * ListHostsRequest request =
+ * ListHostsRequest.newBuilder()
+ * .setAssociation("association-87499647")
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setReturnPartialSuccess(true)
+ * .setZone("zone3744684")
+ * .build();
+ * while (true) {
+ * HostsListResponse response = hostsClient.listCallable().call(request);
+ * for (Host element : response.getItemsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HostsSettings.Builder hostsSettingsBuilder = HostsSettings.newBuilder();
+ * hostsSettingsBuilder
+ * .getSettings()
+ * .setRetrySettings(
+ * hostsSettingsBuilder
+ * .getSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * HostsSettings hostsSettings = hostsSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HostsSettings.Builder hostsSettingsBuilder = HostsSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * hostsSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class HostsSettings extends ClientSettings{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReliabilityRisksClient reliabilityRisksClient = ReliabilityRisksClient.create()) {
+ * String project = "project-309310695";
+ * String reliabilityRisk = "reliabilityRisk-127967703";
+ * ReliabilityRisk response = reliabilityRisksClient.get(project, reliabilityRisk);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ * Method
+ * Description
+ * Method Variants
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ReliabilityRisksSettings reliabilityRisksSettings =
+ * ReliabilityRisksSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * ReliabilityRisksClient reliabilityRisksClient =
+ * ReliabilityRisksClient.create(reliabilityRisksSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ReliabilityRisksSettings reliabilityRisksSettings =
+ * ReliabilityRisksSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ReliabilityRisksClient reliabilityRisksClient =
+ * ReliabilityRisksClient.create(reliabilityRisksSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReliabilityRisksClient reliabilityRisksClient = ReliabilityRisksClient.create()) {
+ * String project = "project-309310695";
+ * String reliabilityRisk = "reliabilityRisk-127967703";
+ * ReliabilityRisk response = reliabilityRisksClient.get(project, reliabilityRisk);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param reliabilityRisk Name of the ReliabilityRisk resource to return.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ReliabilityRisk get(String project, String reliabilityRisk) {
+ GetReliabilityRiskRequest request =
+ GetReliabilityRiskRequest.newBuilder()
+ .setProject(project)
+ .setReliabilityRisk(reliabilityRisk)
+ .build();
+ return get(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns the specified ReliabilityRisk resource.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReliabilityRisksClient reliabilityRisksClient = ReliabilityRisksClient.create()) {
+ * GetReliabilityRiskRequest request =
+ * GetReliabilityRiskRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setReliabilityRisk("reliabilityRisk-127967703")
+ * .build();
+ * ReliabilityRisk response = reliabilityRisksClient.get(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ReliabilityRisk get(GetReliabilityRiskRequest request) {
+ return getCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns the specified ReliabilityRisk resource.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReliabilityRisksClient reliabilityRisksClient = ReliabilityRisksClient.create()) {
+ * GetReliabilityRiskRequest request =
+ * GetReliabilityRiskRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setReliabilityRisk("reliabilityRisk-127967703")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReliabilityRisksClient reliabilityRisksClient = ReliabilityRisksClient.create()) {
+ * String project = "project-309310695";
+ * for (ReliabilityRisk element : reliabilityRisksClient.list(project).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPagedResponse list(String project) {
+ ListReliabilityRisksRequest request =
+ ListReliabilityRisksRequest.newBuilder().setProject(project).build();
+ return list(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the list of reliabilityRisks available in the specified project.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReliabilityRisksClient reliabilityRisksClient = ReliabilityRisksClient.create()) {
+ * ListReliabilityRisksRequest request =
+ * ListReliabilityRisksRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * for (ReliabilityRisk element : reliabilityRisksClient.list(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPagedResponse list(ListReliabilityRisksRequest request) {
+ return listPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the list of reliabilityRisks available in the specified project.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReliabilityRisksClient reliabilityRisksClient = ReliabilityRisksClient.create()) {
+ * ListReliabilityRisksRequest request =
+ * ListReliabilityRisksRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReliabilityRisksClient reliabilityRisksClient = ReliabilityRisksClient.create()) {
+ * ListReliabilityRisksRequest request =
+ * ListReliabilityRisksRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * while (true) {
+ * ReliabilityRisksListResponse response = reliabilityRisksClient.listCallable().call(request);
+ * for (ReliabilityRisk element : response.getItemsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ReliabilityRisksSettings.Builder reliabilityRisksSettingsBuilder =
+ * ReliabilityRisksSettings.newBuilder();
+ * reliabilityRisksSettingsBuilder
+ * .getSettings()
+ * .setRetrySettings(
+ * reliabilityRisksSettingsBuilder
+ * .getSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * ReliabilityRisksSettings reliabilityRisksSettings = reliabilityRisksSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class ReliabilityRisksSettings extends ClientSettings{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (HostsClient hostsClient = HostsClient.create()) {
+ * String project = "project-309310695";
+ * String zone = "zone3744684";
+ * String association = "association-87499647";
+ * String host = "host3208616";
+ * Host response = hostsClient.get(project, zone, association, host);
+ * }
+ * }
+ *
* {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ReliabilityRisksClient reliabilityRisksClient = ReliabilityRisksClient.create()) {
+ * String project = "project-309310695";
+ * String reliabilityRisk = "reliabilityRisk-127967703";
+ * ReliabilityRisk response = reliabilityRisksClient.get(project, reliabilityRisk);
+ * }
+ * }
+ *
*
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HostsStubSettings.Builder hostsSettingsBuilder = HostsStubSettings.newBuilder();
+ * hostsSettingsBuilder
+ * .getSettings()
+ * .setRetrySettings(
+ * hostsSettingsBuilder
+ * .getSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * HostsStubSettings hostsSettings = hostsSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * HostsStubSettings.Builder hostsSettingsBuilder = HostsStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * hostsSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+@SuppressWarnings("CanonicalDuration")
+public class HostsStubSettings extends StubSettings