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:
+ * Required. The API key for ExaAiSearch. + *+ * + *
string api_key = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The apiKey.
+ */
+ java.lang.String getApiKey();
+
+ /**
+ *
+ *
+ * + * Required. The API key for ExaAiSearch. + *+ * + *
string api_key = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for apiKey.
+ */
+ com.google.protobuf.ByteString getApiKeyBytes();
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the customConfigs field is set.
+ */
+ boolean hasCustomConfigs();
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The customConfigs.
+ */
+ com.google.protobuf.Struct getCustomConfigs();
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.protobuf.StructOrBuilder getCustomConfigsOrBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * ExaAiSearch tool type. + * A tool that uses the Exa.ai search engine for grounding. + *+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Tool.ExaAiSearch} + */ + public static final class ExaAiSearch extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.Tool.ExaAiSearch) + ExaAiSearchOrBuilder { + 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= */ "", + "ExaAiSearch"); + } + + // Use ExaAiSearch.newBuilder() to construct. + private ExaAiSearch(com.google.protobuf.GeneratedMessage.Builder> builder) { + super(builder); + } + + private ExaAiSearch() { + apiKey_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ToolProto + .internal_static_google_cloud_aiplatform_v1_Tool_ExaAiSearch_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ToolProto + .internal_static_google_cloud_aiplatform_v1_Tool_ExaAiSearch_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Tool.ExaAiSearch.class, + com.google.cloud.aiplatform.v1.Tool.ExaAiSearch.Builder.class); + } + + private int bitField0_; + public static final int API_KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiKey_ = ""; + + /** + * + * + *
+ * Required. The API key for ExaAiSearch. + *+ * + *
string api_key = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The apiKey.
+ */
+ @java.lang.Override
+ public java.lang.String getApiKey() {
+ java.lang.Object ref = apiKey_;
+ 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();
+ apiKey_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Required. The API key for ExaAiSearch. + *+ * + *
string api_key = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for apiKey.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getApiKeyBytes() {
+ java.lang.Object ref = apiKey_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ apiKey_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int CUSTOM_CONFIGS_FIELD_NUMBER = 2;
+ private com.google.protobuf.Struct customConfigs_;
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the customConfigs field is set.
+ */
+ @java.lang.Override
+ public boolean hasCustomConfigs() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The customConfigs.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Struct getCustomConfigs() {
+ return customConfigs_ == null
+ ? com.google.protobuf.Struct.getDefaultInstance()
+ : customConfigs_;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.protobuf.StructOrBuilder getCustomConfigsOrBuilder() {
+ return customConfigs_ == null
+ ? com.google.protobuf.Struct.getDefaultInstance()
+ : customConfigs_;
+ }
+
+ 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(apiKey_)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, apiKey_);
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(2, getCustomConfigs());
+ }
+ 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(apiKey_)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, apiKey_);
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCustomConfigs());
+ }
+ 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.aiplatform.v1.Tool.ExaAiSearch)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.aiplatform.v1.Tool.ExaAiSearch other =
+ (com.google.cloud.aiplatform.v1.Tool.ExaAiSearch) obj;
+
+ if (!getApiKey().equals(other.getApiKey())) return false;
+ if (hasCustomConfigs() != other.hasCustomConfigs()) return false;
+ if (hasCustomConfigs()) {
+ if (!getCustomConfigs().equals(other.getCustomConfigs())) 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) + API_KEY_FIELD_NUMBER;
+ hash = (53 * hash) + getApiKey().hashCode();
+ if (hasCustomConfigs()) {
+ hash = (37 * hash) + CUSTOM_CONFIGS_FIELD_NUMBER;
+ hash = (53 * hash) + getCustomConfigs().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.aiplatform.v1.Tool.ExaAiSearch parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.aiplatform.v1.Tool.ExaAiSearch 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.aiplatform.v1.Tool.ExaAiSearch parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.aiplatform.v1.Tool.ExaAiSearch 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.aiplatform.v1.Tool.ExaAiSearch parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.aiplatform.v1.Tool.ExaAiSearch parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.aiplatform.v1.Tool.ExaAiSearch parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.aiplatform.v1.Tool.ExaAiSearch 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.aiplatform.v1.Tool.ExaAiSearch parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.aiplatform.v1.Tool.ExaAiSearch 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.aiplatform.v1.Tool.ExaAiSearch parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.aiplatform.v1.Tool.ExaAiSearch 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.aiplatform.v1.Tool.ExaAiSearch 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;
+ }
+
+ /**
+ *
+ *
+ * + * ExaAiSearch tool type. + * A tool that uses the Exa.ai search engine for grounding. + *+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Tool.ExaAiSearch} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder
+ * Required. The API key for ExaAiSearch. + *+ * + *
string api_key = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The apiKey.
+ */
+ public java.lang.String getApiKey() {
+ java.lang.Object ref = apiKey_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ apiKey_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Required. The API key for ExaAiSearch. + *+ * + *
string api_key = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for apiKey.
+ */
+ public com.google.protobuf.ByteString getApiKeyBytes() {
+ java.lang.Object ref = apiKey_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ apiKey_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Required. The API key for ExaAiSearch. + *+ * + *
string api_key = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The apiKey to set.
+ * @return This builder for chaining.
+ */
+ public Builder setApiKey(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ apiKey_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Required. The API key for ExaAiSearch. + *+ * + *
string api_key = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearApiKey() {
+ apiKey_ = getDefaultInstance().getApiKey();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Required. The API key for ExaAiSearch. + *+ * + *
string api_key = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The bytes for apiKey to set.
+ * @return This builder for chaining.
+ */
+ public Builder setApiKeyBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ apiKey_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Struct customConfigs_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.protobuf.Struct,
+ com.google.protobuf.Struct.Builder,
+ com.google.protobuf.StructOrBuilder>
+ customConfigsBuilder_;
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the customConfigs field is set.
+ */
+ public boolean hasCustomConfigs() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The customConfigs.
+ */
+ public com.google.protobuf.Struct getCustomConfigs() {
+ if (customConfigsBuilder_ == null) {
+ return customConfigs_ == null
+ ? com.google.protobuf.Struct.getDefaultInstance()
+ : customConfigs_;
+ } else {
+ return customConfigsBuilder_.getMessage();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setCustomConfigs(com.google.protobuf.Struct value) {
+ if (customConfigsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ customConfigs_ = value;
+ } else {
+ customConfigsBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setCustomConfigs(com.google.protobuf.Struct.Builder builderForValue) {
+ if (customConfigsBuilder_ == null) {
+ customConfigs_ = builderForValue.build();
+ } else {
+ customConfigsBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeCustomConfigs(com.google.protobuf.Struct value) {
+ if (customConfigsBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0)
+ && customConfigs_ != null
+ && customConfigs_ != com.google.protobuf.Struct.getDefaultInstance()) {
+ getCustomConfigsBuilder().mergeFrom(value);
+ } else {
+ customConfigs_ = value;
+ }
+ } else {
+ customConfigsBuilder_.mergeFrom(value);
+ }
+ if (customConfigs_ != null) {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearCustomConfigs() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ customConfigs_ = null;
+ if (customConfigsBuilder_ != null) {
+ customConfigsBuilder_.dispose();
+ customConfigsBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.protobuf.Struct.Builder getCustomConfigsBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return internalGetCustomConfigsFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.protobuf.StructOrBuilder getCustomConfigsOrBuilder() {
+ if (customConfigsBuilder_ != null) {
+ return customConfigsBuilder_.getMessageOrBuilder();
+ } else {
+ return customConfigs_ == null
+ ? com.google.protobuf.Struct.getDefaultInstance()
+ : customConfigs_;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.protobuf.Struct,
+ com.google.protobuf.Struct.Builder,
+ com.google.protobuf.StructOrBuilder>
+ internalGetCustomConfigsFieldBuilder() {
+ if (customConfigsBuilder_ == null) {
+ customConfigsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilder<
+ com.google.protobuf.Struct,
+ com.google.protobuf.Struct.Builder,
+ com.google.protobuf.StructOrBuilder>(
+ getCustomConfigs(), getParentForChildren(), isClean());
+ customConfigs_ = null;
+ }
+ return customConfigsBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.Tool.ExaAiSearch)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.Tool.ExaAiSearch)
+ private static final com.google.cloud.aiplatform.v1.Tool.ExaAiSearch DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.Tool.ExaAiSearch();
+ }
+
+ public static com.google.cloud.aiplatform.v1.Tool.ExaAiSearch getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the exaAiSearch field is set.
+ */
+ @java.lang.Override
+ public boolean hasExaAiSearch() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The exaAiSearch.
+ */
+ @java.lang.Override
+ public com.google.cloud.aiplatform.v1.Tool.ExaAiSearch getExaAiSearch() {
+ return exaAiSearch_ == null
+ ? com.google.cloud.aiplatform.v1.Tool.ExaAiSearch.getDefaultInstance()
+ : exaAiSearch_;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.aiplatform.v1.Tool.ExaAiSearchOrBuilder getExaAiSearchOrBuilder() {
+ return exaAiSearch_ == null
+ ? com.google.cloud.aiplatform.v1.Tool.ExaAiSearch.getDefaultInstance()
+ : exaAiSearch_;
+ }
+
public static final int CODE_EXECUTION_FIELD_NUMBER = 4;
private com.google.cloud.aiplatform.v1.Tool.CodeExecution codeExecution_;
@@ -4758,7 +5792,7 @@ public com.google.cloud.aiplatform.v1.Tool.ParallelAiSearch getParallelAiSearch(
*/
@java.lang.Override
public boolean hasCodeExecution() {
- return ((bitField0_ & 0x00000040) != 0);
+ return ((bitField0_ & 0x00000080) != 0);
}
/**
@@ -4819,7 +5853,7 @@ public com.google.cloud.aiplatform.v1.Tool.CodeExecutionOrBuilder getCodeExecuti
*/
@java.lang.Override
public boolean hasUrlContext() {
- return ((bitField0_ & 0x00000080) != 0);
+ return ((bitField0_ & 0x00000100) != 0);
}
/**
@@ -4880,7 +5914,7 @@ public com.google.cloud.aiplatform.v1.UrlContextOrBuilder getUrlContextOrBuilder
*/
@java.lang.Override
public boolean hasComputerUse() {
- return ((bitField0_ & 0x00000100) != 0);
+ return ((bitField0_ & 0x00000200) != 0);
}
/**
@@ -4948,7 +5982,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(3, getGoogleSearchRetrieval());
}
- if (((bitField0_ & 0x00000040) != 0)) {
+ if (((bitField0_ & 0x00000080) != 0)) {
output.writeMessage(4, getCodeExecution());
}
if (((bitField0_ & 0x00000008) != 0)) {
@@ -4960,15 +5994,18 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(7, getGoogleSearch());
}
- if (((bitField0_ & 0x00000080) != 0)) {
+ if (((bitField0_ & 0x00000100) != 0)) {
output.writeMessage(10, getUrlContext());
}
- if (((bitField0_ & 0x00000100) != 0)) {
+ if (((bitField0_ & 0x00000200) != 0)) {
output.writeMessage(11, getComputerUse());
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeMessage(13, getParallelAiSearch());
}
+ if (((bitField0_ & 0x00000040) != 0)) {
+ output.writeMessage(15, getExaAiSearch());
+ }
getUnknownFields().writeTo(output);
}
@@ -4989,7 +6026,7 @@ public int getSerializedSize() {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(3, getGoogleSearchRetrieval());
}
- if (((bitField0_ & 0x00000040) != 0)) {
+ if (((bitField0_ & 0x00000080) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCodeExecution());
}
if (((bitField0_ & 0x00000008) != 0)) {
@@ -5001,15 +6038,18 @@ public int getSerializedSize() {
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getGoogleSearch());
}
- if (((bitField0_ & 0x00000080) != 0)) {
+ if (((bitField0_ & 0x00000100) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getUrlContext());
}
- if (((bitField0_ & 0x00000100) != 0)) {
+ if (((bitField0_ & 0x00000200) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getComputerUse());
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getParallelAiSearch());
}
+ if (((bitField0_ & 0x00000040) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getExaAiSearch());
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -5050,6 +6090,10 @@ public boolean equals(final java.lang.Object obj) {
if (hasParallelAiSearch()) {
if (!getParallelAiSearch().equals(other.getParallelAiSearch())) return false;
}
+ if (hasExaAiSearch() != other.hasExaAiSearch()) return false;
+ if (hasExaAiSearch()) {
+ if (!getExaAiSearch().equals(other.getExaAiSearch())) return false;
+ }
if (hasCodeExecution() != other.hasCodeExecution()) return false;
if (hasCodeExecution()) {
if (!getCodeExecution().equals(other.getCodeExecution())) return false;
@@ -5101,6 +6145,10 @@ public int hashCode() {
hash = (37 * hash) + PARALLEL_AI_SEARCH_FIELD_NUMBER;
hash = (53 * hash) + getParallelAiSearch().hashCode();
}
+ if (hasExaAiSearch()) {
+ hash = (37 * hash) + EXA_AI_SEARCH_FIELD_NUMBER;
+ hash = (53 * hash) + getExaAiSearch().hashCode();
+ }
if (hasCodeExecution()) {
hash = (37 * hash) + CODE_EXECUTION_FIELD_NUMBER;
hash = (53 * hash) + getCodeExecution().hashCode();
@@ -5266,6 +6314,7 @@ private void maybeForceBuilderInitialization() {
internalGetGoogleMapsFieldBuilder();
internalGetEnterpriseWebSearchFieldBuilder();
internalGetParallelAiSearchFieldBuilder();
+ internalGetExaAiSearchFieldBuilder();
internalGetCodeExecutionFieldBuilder();
internalGetUrlContextFieldBuilder();
internalGetComputerUseFieldBuilder();
@@ -5313,6 +6362,11 @@ public Builder clear() {
parallelAiSearchBuilder_.dispose();
parallelAiSearchBuilder_ = null;
}
+ exaAiSearch_ = null;
+ if (exaAiSearchBuilder_ != null) {
+ exaAiSearchBuilder_.dispose();
+ exaAiSearchBuilder_ = null;
+ }
codeExecution_ = null;
if (codeExecutionBuilder_ != null) {
codeExecutionBuilder_.dispose();
@@ -5410,18 +6464,23 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.Tool result) {
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
- result.codeExecution_ =
- codeExecutionBuilder_ == null ? codeExecution_ : codeExecutionBuilder_.build();
+ result.exaAiSearch_ =
+ exaAiSearchBuilder_ == null ? exaAiSearch_ : exaAiSearchBuilder_.build();
to_bitField0_ |= 0x00000040;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
- result.urlContext_ = urlContextBuilder_ == null ? urlContext_ : urlContextBuilder_.build();
+ result.codeExecution_ =
+ codeExecutionBuilder_ == null ? codeExecution_ : codeExecutionBuilder_.build();
to_bitField0_ |= 0x00000080;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
+ result.urlContext_ = urlContextBuilder_ == null ? urlContext_ : urlContextBuilder_.build();
+ to_bitField0_ |= 0x00000100;
+ }
+ if (((from_bitField0_ & 0x00000400) != 0)) {
result.computerUse_ =
computerUseBuilder_ == null ? computerUse_ : computerUseBuilder_.build();
- to_bitField0_ |= 0x00000100;
+ to_bitField0_ |= 0x00000200;
}
result.bitField0_ |= to_bitField0_;
}
@@ -5483,6 +6542,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.Tool other) {
if (other.hasParallelAiSearch()) {
mergeParallelAiSearch(other.getParallelAiSearch());
}
+ if (other.hasExaAiSearch()) {
+ mergeExaAiSearch(other.getExaAiSearch());
+ }
if (other.hasCodeExecution()) {
mergeCodeExecution(other.getCodeExecution());
}
@@ -5550,7 +6612,7 @@ public Builder mergeFrom(
{
input.readMessage(
internalGetCodeExecutionFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000080;
+ bitField0_ |= 0x00000100;
break;
} // case 34
case 42:
@@ -5578,14 +6640,14 @@ public Builder mergeFrom(
{
input.readMessage(
internalGetUrlContextFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000100;
+ bitField0_ |= 0x00000200;
break;
} // case 82
case 90:
{
input.readMessage(
internalGetComputerUseFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000200;
+ bitField0_ |= 0x00000400;
break;
} // case 90
case 106:
@@ -5595,6 +6657,13 @@ public Builder mergeFrom(
bitField0_ |= 0x00000040;
break;
} // case 106
+ case 122:
+ {
+ input.readMessage(
+ internalGetExaAiSearchFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000080;
+ break;
+ } // case 122
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -7548,6 +8617,238 @@ public Builder clearParallelAiSearch() {
return parallelAiSearchBuilder_;
}
+ private com.google.cloud.aiplatform.v1.Tool.ExaAiSearch exaAiSearch_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.cloud.aiplatform.v1.Tool.ExaAiSearch,
+ com.google.cloud.aiplatform.v1.Tool.ExaAiSearch.Builder,
+ com.google.cloud.aiplatform.v1.Tool.ExaAiSearchOrBuilder>
+ exaAiSearchBuilder_;
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the exaAiSearch field is set.
+ */
+ public boolean hasExaAiSearch() {
+ return ((bitField0_ & 0x00000080) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The exaAiSearch.
+ */
+ public com.google.cloud.aiplatform.v1.Tool.ExaAiSearch getExaAiSearch() {
+ if (exaAiSearchBuilder_ == null) {
+ return exaAiSearch_ == null
+ ? com.google.cloud.aiplatform.v1.Tool.ExaAiSearch.getDefaultInstance()
+ : exaAiSearch_;
+ } else {
+ return exaAiSearchBuilder_.getMessage();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setExaAiSearch(com.google.cloud.aiplatform.v1.Tool.ExaAiSearch value) {
+ if (exaAiSearchBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ exaAiSearch_ = value;
+ } else {
+ exaAiSearchBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setExaAiSearch(
+ com.google.cloud.aiplatform.v1.Tool.ExaAiSearch.Builder builderForValue) {
+ if (exaAiSearchBuilder_ == null) {
+ exaAiSearch_ = builderForValue.build();
+ } else {
+ exaAiSearchBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeExaAiSearch(com.google.cloud.aiplatform.v1.Tool.ExaAiSearch value) {
+ if (exaAiSearchBuilder_ == null) {
+ if (((bitField0_ & 0x00000080) != 0)
+ && exaAiSearch_ != null
+ && exaAiSearch_
+ != com.google.cloud.aiplatform.v1.Tool.ExaAiSearch.getDefaultInstance()) {
+ getExaAiSearchBuilder().mergeFrom(value);
+ } else {
+ exaAiSearch_ = value;
+ }
+ } else {
+ exaAiSearchBuilder_.mergeFrom(value);
+ }
+ if (exaAiSearch_ != null) {
+ bitField0_ |= 0x00000080;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearExaAiSearch() {
+ bitField0_ = (bitField0_ & ~0x00000080);
+ exaAiSearch_ = null;
+ if (exaAiSearchBuilder_ != null) {
+ exaAiSearchBuilder_.dispose();
+ exaAiSearchBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.aiplatform.v1.Tool.ExaAiSearch.Builder getExaAiSearchBuilder() {
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return internalGetExaAiSearchFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.aiplatform.v1.Tool.ExaAiSearchOrBuilder getExaAiSearchOrBuilder() {
+ if (exaAiSearchBuilder_ != null) {
+ return exaAiSearchBuilder_.getMessageOrBuilder();
+ } else {
+ return exaAiSearch_ == null
+ ? com.google.cloud.aiplatform.v1.Tool.ExaAiSearch.getDefaultInstance()
+ : exaAiSearch_;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.cloud.aiplatform.v1.Tool.ExaAiSearch,
+ com.google.cloud.aiplatform.v1.Tool.ExaAiSearch.Builder,
+ com.google.cloud.aiplatform.v1.Tool.ExaAiSearchOrBuilder>
+ internalGetExaAiSearchFieldBuilder() {
+ if (exaAiSearchBuilder_ == null) {
+ exaAiSearchBuilder_ =
+ new com.google.protobuf.SingleFieldBuilder<
+ com.google.cloud.aiplatform.v1.Tool.ExaAiSearch,
+ com.google.cloud.aiplatform.v1.Tool.ExaAiSearch.Builder,
+ com.google.cloud.aiplatform.v1.Tool.ExaAiSearchOrBuilder>(
+ getExaAiSearch(), getParentForChildren(), isClean());
+ exaAiSearch_ = null;
+ }
+ return exaAiSearchBuilder_;
+ }
+
private com.google.cloud.aiplatform.v1.Tool.CodeExecution codeExecution_;
private com.google.protobuf.SingleFieldBuilder<
com.google.cloud.aiplatform.v1.Tool.CodeExecution,
@@ -7570,7 +8871,7 @@ public Builder clearParallelAiSearch() {
* @return Whether the codeExecution field is set.
*/
public boolean hasCodeExecution() {
- return ((bitField0_ & 0x00000080) != 0);
+ return ((bitField0_ & 0x00000100) != 0);
}
/**
@@ -7618,7 +8919,7 @@ public Builder setCodeExecution(com.google.cloud.aiplatform.v1.Tool.CodeExecutio
} else {
codeExecutionBuilder_.setMessage(value);
}
- bitField0_ |= 0x00000080;
+ bitField0_ |= 0x00000100;
onChanged();
return this;
}
@@ -7642,7 +8943,7 @@ public Builder setCodeExecution(
} else {
codeExecutionBuilder_.setMessage(builderForValue.build());
}
- bitField0_ |= 0x00000080;
+ bitField0_ |= 0x00000100;
onChanged();
return this;
}
@@ -7661,7 +8962,7 @@ public Builder setCodeExecution(
*/
public Builder mergeCodeExecution(com.google.cloud.aiplatform.v1.Tool.CodeExecution value) {
if (codeExecutionBuilder_ == null) {
- if (((bitField0_ & 0x00000080) != 0)
+ if (((bitField0_ & 0x00000100) != 0)
&& codeExecution_ != null
&& codeExecution_
!= com.google.cloud.aiplatform.v1.Tool.CodeExecution.getDefaultInstance()) {
@@ -7673,7 +8974,7 @@ public Builder mergeCodeExecution(com.google.cloud.aiplatform.v1.Tool.CodeExecut
codeExecutionBuilder_.mergeFrom(value);
}
if (codeExecution_ != null) {
- bitField0_ |= 0x00000080;
+ bitField0_ |= 0x00000100;
onChanged();
}
return this;
@@ -7692,7 +8993,7 @@ public Builder mergeCodeExecution(com.google.cloud.aiplatform.v1.Tool.CodeExecut
*
*/
public Builder clearCodeExecution() {
- bitField0_ = (bitField0_ & ~0x00000080);
+ bitField0_ = (bitField0_ & ~0x00000100);
codeExecution_ = null;
if (codeExecutionBuilder_ != null) {
codeExecutionBuilder_.dispose();
@@ -7715,7 +9016,7 @@ public Builder clearCodeExecution() {
*
*/
public com.google.cloud.aiplatform.v1.Tool.CodeExecution.Builder getCodeExecutionBuilder() {
- bitField0_ |= 0x00000080;
+ bitField0_ |= 0x00000100;
onChanged();
return internalGetCodeExecutionFieldBuilder().getBuilder();
}
@@ -7792,7 +9093,7 @@ public com.google.cloud.aiplatform.v1.Tool.CodeExecutionOrBuilder getCodeExecuti
* @return Whether the urlContext field is set.
*/
public boolean hasUrlContext() {
- return ((bitField0_ & 0x00000100) != 0);
+ return ((bitField0_ & 0x00000200) != 0);
}
/**
@@ -7838,7 +9139,7 @@ public Builder setUrlContext(com.google.cloud.aiplatform.v1.UrlContext value) {
} else {
urlContextBuilder_.setMessage(value);
}
- bitField0_ |= 0x00000100;
+ bitField0_ |= 0x00000200;
onChanged();
return this;
}
@@ -7861,7 +9162,7 @@ public Builder setUrlContext(
} else {
urlContextBuilder_.setMessage(builderForValue.build());
}
- bitField0_ |= 0x00000100;
+ bitField0_ |= 0x00000200;
onChanged();
return this;
}
@@ -7879,7 +9180,7 @@ public Builder setUrlContext(
*/
public Builder mergeUrlContext(com.google.cloud.aiplatform.v1.UrlContext value) {
if (urlContextBuilder_ == null) {
- if (((bitField0_ & 0x00000100) != 0)
+ if (((bitField0_ & 0x00000200) != 0)
&& urlContext_ != null
&& urlContext_ != com.google.cloud.aiplatform.v1.UrlContext.getDefaultInstance()) {
getUrlContextBuilder().mergeFrom(value);
@@ -7890,7 +9191,7 @@ public Builder mergeUrlContext(com.google.cloud.aiplatform.v1.UrlContext value)
urlContextBuilder_.mergeFrom(value);
}
if (urlContext_ != null) {
- bitField0_ |= 0x00000100;
+ bitField0_ |= 0x00000200;
onChanged();
}
return this;
@@ -7908,7 +9209,7 @@ public Builder mergeUrlContext(com.google.cloud.aiplatform.v1.UrlContext value)
*
*/
public Builder clearUrlContext() {
- bitField0_ = (bitField0_ & ~0x00000100);
+ bitField0_ = (bitField0_ & ~0x00000200);
urlContext_ = null;
if (urlContextBuilder_ != null) {
urlContextBuilder_.dispose();
@@ -7930,7 +9231,7 @@ public Builder clearUrlContext() {
*
*/
public com.google.cloud.aiplatform.v1.UrlContext.Builder getUrlContextBuilder() {
- bitField0_ |= 0x00000100;
+ bitField0_ |= 0x00000200;
onChanged();
return internalGetUrlContextFieldBuilder().getBuilder();
}
@@ -8007,7 +9308,7 @@ public com.google.cloud.aiplatform.v1.UrlContextOrBuilder getUrlContextOrBuilder
* @return Whether the computerUse field is set.
*/
public boolean hasComputerUse() {
- return ((bitField0_ & 0x00000200) != 0);
+ return ((bitField0_ & 0x00000400) != 0);
}
/**
@@ -8057,7 +9358,7 @@ public Builder setComputerUse(com.google.cloud.aiplatform.v1.Tool.ComputerUse va
} else {
computerUseBuilder_.setMessage(value);
}
- bitField0_ |= 0x00000200;
+ bitField0_ |= 0x00000400;
onChanged();
return this;
}
@@ -8082,7 +9383,7 @@ public Builder setComputerUse(
} else {
computerUseBuilder_.setMessage(builderForValue.build());
}
- bitField0_ |= 0x00000200;
+ bitField0_ |= 0x00000400;
onChanged();
return this;
}
@@ -8102,7 +9403,7 @@ public Builder setComputerUse(
*/
public Builder mergeComputerUse(com.google.cloud.aiplatform.v1.Tool.ComputerUse value) {
if (computerUseBuilder_ == null) {
- if (((bitField0_ & 0x00000200) != 0)
+ if (((bitField0_ & 0x00000400) != 0)
&& computerUse_ != null
&& computerUse_
!= com.google.cloud.aiplatform.v1.Tool.ComputerUse.getDefaultInstance()) {
@@ -8114,7 +9415,7 @@ public Builder mergeComputerUse(com.google.cloud.aiplatform.v1.Tool.ComputerUse
computerUseBuilder_.mergeFrom(value);
}
if (computerUse_ != null) {
- bitField0_ |= 0x00000200;
+ bitField0_ |= 0x00000400;
onChanged();
}
return this;
@@ -8134,7 +9435,7 @@ public Builder mergeComputerUse(com.google.cloud.aiplatform.v1.Tool.ComputerUse
*
*/
public Builder clearComputerUse() {
- bitField0_ = (bitField0_ & ~0x00000200);
+ bitField0_ = (bitField0_ & ~0x00000400);
computerUse_ = null;
if (computerUseBuilder_ != null) {
computerUseBuilder_.dispose();
@@ -8158,7 +9459,7 @@ public Builder clearComputerUse() {
*
*/
public com.google.cloud.aiplatform.v1.Tool.ComputerUse.Builder getComputerUseBuilder() {
- bitField0_ |= 0x00000200;
+ bitField0_ |= 0x00000400;
onChanged();
return internalGetComputerUseFieldBuilder().getBuilder();
}
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ToolOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ToolOrBuilder.java
index 336d00d9db94..d88f3eb44fda 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ToolOrBuilder.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ToolOrBuilder.java
@@ -418,6 +418,55 @@ com.google.cloud.aiplatform.v1.FunctionDeclarationOrBuilder getFunctionDeclarati
*/
com.google.cloud.aiplatform.v1.Tool.ParallelAiSearchOrBuilder getParallelAiSearchOrBuilder();
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the exaAiSearch field is set.
+ */
+ boolean hasExaAiSearch();
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The exaAiSearch.
+ */
+ com.google.cloud.aiplatform.v1.Tool.ExaAiSearch getExaAiSearch();
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.cloud.aiplatform.v1.Tool.ExaAiSearchOrBuilder getExaAiSearchOrBuilder();
+
/**
*
*
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ToolProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ToolProto.java
index 2a072451f85b..cebde2095d33 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ToolProto.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ToolProto.java
@@ -52,6 +52,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_cloud_aiplatform_v1_Tool_ParallelAiSearch_descriptor;
static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_google_cloud_aiplatform_v1_Tool_ParallelAiSearch_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_aiplatform_v1_Tool_ExaAiSearch_descriptor;
+ static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_google_cloud_aiplatform_v1_Tool_ExaAiSearch_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_cloud_aiplatform_v1_Tool_CodeExecution_descriptor;
static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
@@ -182,7 +186,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\032google.cloud.aiplatform.v1\032\037google/api/"
+ "field_behavior.proto\032\031google/api/resourc"
+ "e.proto\032(google/cloud/aiplatform/v1/open"
- + "api.proto\032\034google/protobuf/struct.proto\032\030google/type/latlng.proto\"\337\013\n"
+ + "api.proto\032\034google/protobuf/struct.proto\032\030google/type/latlng.proto\"\204\r\n"
+ "\004Tool\022S\n"
+ "\025function_declarations\030\001 \003(\0132/.google.cloud"
+ ".aiplatform.v1.FunctionDeclarationB\003\340A\001\022=\n"
@@ -197,26 +201,31 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\025enterprise_web_search\030\006 "
+ "\001(\0132/.google.cloud.aiplatform.v1.EnterpriseWebSearchB\003\340A\001\022R\n"
+ "\022parallel_ai_search\030\r"
- + " \001(\01321.google.cloud.aiplatform.v1.Tool.ParallelAiSearchB\003\340A\001\022K\n"
- + "\016code_execution\030\004"
- + " \001(\0132..google.cloud.aiplatform.v1.Tool.CodeExecutionB\003\340A\001\022@\n"
+ + " \001(\01321.google.cloud.aiplatform.v1.Tool.ParallelAiSearchB\003\340A\001\022H\n\r"
+ + "exa_ai_search\030\017"
+ + " \001(\0132,.google.cloud.aiplatform.v1.Tool.ExaAiSearchB\003\340A\001\022K\n"
+ + "\016code_execution\030\004 \001(\0132"
+ + "..google.cloud.aiplatform.v1.Tool.CodeExecutionB\003\340A\001\022@\n"
+ "\013url_context\030\n"
+ " \001(\0132&.google.cloud.aiplatform.v1.UrlContextB\003\340A\001\022G\n"
- + "\014computer_use\030\013 \001(\0132,.google.clou"
- + "d.aiplatform.v1.Tool.ComputerUseB\003\340A\001\032\241\001\n"
+ + "\014computer_use\030\013"
+ + " \001(\0132,.google.cloud.aiplatform.v1.Tool.ComputerUseB\003\340A\001\032\241\001\n"
+ "\014GoogleSearch\022\034\n"
+ "\017exclude_domains\030\003 \003(\tB\003\340A\001\022[\n"
- + "\023blocking_confidence\030\004 \001(\01624.goog"
- + "le.cloud.aiplatform.v1.Tool.PhishBlockThresholdB\003\340A\001H\000\210\001\001B\026\n"
+ + "\023blocking_confidence\030\004 \001(\01624.google.clo"
+ + "ud.aiplatform.v1.Tool.PhishBlockThresholdB\003\340A\001H\000\210\001\001B\026\n"
+ "\024_blocking_confidence\032^\n"
+ "\020ParallelAiSearch\022\024\n"
+ "\007api_key\030\001 \001(\tB\003\340A\001\0224\n"
- + "\016custom_configs\030\003"
+ + "\016custom_configs\030\003 \001(\0132\027.google.protobuf.StructB\003\340A\001\032Y\n"
+ + "\013ExaAiSearch\022\024\n"
+ + "\007api_key\030\001 \001(\tB\003\340A\002\0224\n"
+ + "\016custom_configs\030\002"
+ " \001(\0132\027.google.protobuf.StructB\003\340A\001\032\017\n\r"
+ "CodeExecution\032\322\001\n"
+ "\013ComputerUse\022R\n"
- + "\013environment\030\001 \001(\01628.google"
- + ".cloud.aiplatform.v1.Tool.ComputerUse.EnvironmentB\003\340A\002\022*\n"
+ + "\013environment\030\001 \001(\01628.g"
+ + "oogle.cloud.aiplatform.v1.Tool.ComputerUse.EnvironmentB\003\340A\002\022*\n"
+ "\035excluded_predefined_functions\030\002 \003(\tB\003\340A\001\"C\n"
+ "\013Environment\022\033\n"
+ "\027ENVIRONMENT_UNSPECIFIED\020\000\022\027\n"
@@ -237,22 +246,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "parameters\030\003 \001(\0132\".google.cloud.aiplatform.v1.SchemaB\003\340A\001\022;\n"
+ "\026parameters_json_schema\030\005"
+ " \001(\0132\026.google.protobuf.ValueB\003\340A\001\0229\n"
- + "\010response\030\004"
- + " \001(\0132\".google.cloud.aiplatform.v1.SchemaB\003\340A\001\0229\n"
+ + "\010response\030\004 \001(\0132"
+ + "\".google.cloud.aiplatform.v1.SchemaB\003\340A\001\0229\n"
+ "\024response_json_schema\030\006"
+ " \001(\0132\026.google.protobuf.ValueB\003\340A\001\"\254\001\n"
+ "\014FunctionCall\022\021\n"
+ "\004name\030\001 \001(\tB\003\340A\001\022*\n"
+ "\004args\030\002 \001(\0132\027.google.protobuf.StructB\003\340A\001\022A\n"
- + "\014partial_args\030\004 \003(\0132&.g"
- + "oogle.cloud.aiplatform.v1.PartialArgB\003\340A\001\022\032\n\r"
+ + "\014partial_args\030\004 \003("
+ + "\0132&.google.cloud.aiplatform.v1.PartialArgB\003\340A\001\022\032\n\r"
+ "will_continue\030\005 \001(\010B\003\340A\001\"\325\001\n\n"
+ "PartialArg\0225\n\n"
+ "null_value\030\002"
+ " \001(\0162\032.google.protobuf.NullValueB\003\340A\001H\000\022\033\n"
+ "\014number_value\030\003 \001(\001B\003\340A\001H\000\022\033\n"
- + "\014string_value\030\004 \001(\tB\003\340A\001H\000\022\031\n"
- + "\n"
+ + "\014string_value\030\004 \001(\tB\003\340A\001H\000\022\031\n\n"
+ "bool_value\030\005 \001(\010B\003\340A\001H\000\022\026\n"
+ "\tjson_path\030\001 \001(\tB\003\340A\002\022\032\n\r"
+ "will_continue\030\006 \001(\010B\003\340A\001B\007\n"
@@ -260,8 +268,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\024FunctionResponsePart\022G\n"
+ "\013inline_data\030\001"
+ " \001(\01320.google.cloud.aiplatform.v1.FunctionResponseBlobH\000\022I\n"
- + "\tfile_data\030\002 \001"
- + "(\01324.google.cloud.aiplatform.v1.FunctionResponseFileDataH\000B\006\n"
+ + "\tfile_data\030\002"
+ + " \001(\01324.google.cloud.aiplatform.v1.FunctionResponseFileDataH\000B\006\n"
+ "\004data\"\\\n"
+ "\024FunctionResponseBlob\022\026\n"
+ "\tmime_type\030\001 \001(\tB\003\340A\002\022\021\n"
@@ -277,15 +285,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\005parts\030\004"
+ " \003(\01320.google.cloud.aiplatform.v1.FunctionResponsePartB\003\340A\001\"\241\001\n"
+ "\016ExecutableCode\022J\n"
- + "\010language\030\001"
- + " \001(\01623.google.cloud.aiplatform.v1.ExecutableCode.LanguageB\003\340A\002\022\021\n"
+ + "\010language\030\001 \001(\01623.google.cloud.ai"
+ + "platform.v1.ExecutableCode.LanguageB\003\340A\002\022\021\n"
+ "\004code\030\002 \001(\tB\003\340A\002\"0\n"
+ "\010Language\022\030\n"
+ "\024LANGUAGE_UNSPECIFIED\020\000\022\n\n"
+ "\006PYTHON\020\001\"\340\001\n"
+ "\023CodeExecutionResult\022M\n"
- + "\007outcome\030\001 \001(\01627.google.cloud"
- + ".aiplatform.v1.CodeExecutionResult.OutcomeB\003\340A\002\022\023\n"
+ + "\007outcome\030\001 \001(\01627.google."
+ + "cloud.aiplatform.v1.CodeExecutionResult.OutcomeB\003\340A\002\022\023\n"
+ "\006output\030\002 \001(\tB\003\340A\001\"e\n"
+ "\007Outcome\022\027\n"
+ "\023OUTCOME_UNSPECIFIED\020\000\022\016\n\n"
@@ -295,18 +303,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\tRetrieval\022F\n"
+ "\020vertex_ai_search\030\002"
+ " \001(\0132*.google.cloud.aiplatform.v1.VertexAISearchH\000\022F\n"
- + "\020vertex_rag_store\030\004 "
- + "\001(\0132*.google.cloud.aiplatform.v1.VertexRagStoreH\000\022\"\n"
+ + "\020vertex_rag_store\030\004"
+ + " \001(\0132*.google.cloud.aiplatform.v1.VertexRagStoreH\000\022\"\n"
+ "\023disable_attribution\030\003 \001(\010B\005\030\001\340A\001B\010\n"
+ "\006source\"\252\003\n"
+ "\016VertexRagStore\022R\n\r"
- + "rag_resources\030\004 \003(\01326.google.cloud.aiplatf"
- + "orm.v1.VertexRagStore.RagResourceB\003\340A\001\022$\n"
+ + "rag_resources\030\004 \003(\01326.google.cloud.ai"
+ + "platform.v1.VertexRagStore.RagResourceB\003\340A\001\022$\n"
+ "\020similarity_top_k\030\002 \001(\005B\005\030\001\340A\001H\000\210\001\001\022-\n"
+ "\031vector_distance_threshold\030\003"
+ " \001(\001B\005\030\001\340A\001H\001\210\001\001\022Q\n"
- + "\024rag_retrieval_config\030\006 \001(\0132..goog"
- + "le.cloud.aiplatform.v1.RagRetrievalConfigB\003\340A\001\032i\n"
+ + "\024rag_retrieval_config\030\006 \001(\0132."
+ + ".google.cloud.aiplatform.v1.RagRetrievalConfigB\003\340A\001\032i\n"
+ "\013RagResource\022?\n\n"
+ "rag_corpus\030\001 \001(\tB+\340A\001\372A%\n"
+ "#aiplatform.googleapis.com/RagCorpus\022\031\n"
@@ -318,34 +326,34 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\006engine\030\002 \001(\tB\003\340A\001\022\030\n"
+ "\013max_results\030\003 \001(\005B\003\340A\001\022\023\n"
+ "\006filter\030\004 \001(\tB\003\340A\001\022R\n"
- + "\020data_store_specs\030\005 \003(\01328.google.cloud.aip"
- + "latform.v1.VertexAISearch.DataStoreSpec\0328\n\r"
+ + "\020data_store_specs\030\005 \003(\01328.google.clou"
+ + "d.aiplatform.v1.VertexAISearch.DataStoreSpec\0328\n\r"
+ "DataStoreSpec\022\022\n\n"
+ "data_store\030\001 \001(\t\022\023\n"
+ "\006filter\030\002 \001(\tB\003\340A\001\"m\n"
+ "\025GoogleSearchRetrieval\022T\n"
- + "\030dynamic_retrieval_config\030\002 \001(\01322.g"
- + "oogle.cloud.aiplatform.v1.DynamicRetrievalConfig\"(\n\n"
+ + "\030dynamic_retrieval_config\030\002 \001("
+ + "\01322.google.cloud.aiplatform.v1.DynamicRetrievalConfig\"(\n\n"
+ "GoogleMaps\022\032\n\r"
+ "enable_widget\030\001 \001(\010B\003\340A\001\"\250\001\n"
+ "\023EnterpriseWebSearch\022\034\n"
+ "\017exclude_domains\030\001 \003(\tB\003\340A\001\022[\n"
- + "\023blocking_confidence\030\002"
- + " \001(\01624.google.cloud.aiplatform.v1.Tool.PhishBlockThresholdB\003\340A\001H\000\210\001\001B\026\n"
+ + "\023blocking_confidence\030\002 \001(\01624.google.cloud.aiplat"
+ + "form.v1.Tool.PhishBlockThresholdB\003\340A\001H\000\210\001\001B\026\n"
+ "\024_blocking_confidence\"\312\001\n"
+ "\026DynamicRetrievalConfig\022E\n"
- + "\004mode\030\001 \001(\01627.google.cloud.ai"
- + "platform.v1.DynamicRetrievalConfig.Mode\022#\n"
+ + "\004mode\030\001 \001(\01627.google.clo"
+ + "ud.aiplatform.v1.DynamicRetrievalConfig.Mode\022#\n"
+ "\021dynamic_threshold\030\002 \001(\002B\003\340A\001H\000\210\001\001\".\n"
+ "\004Mode\022\024\n"
+ "\020MODE_UNSPECIFIED\020\000\022\020\n"
+ "\014MODE_DYNAMIC\020\001B\024\n"
+ "\022_dynamic_threshold\"\261\001\n\n"
+ "ToolConfig\022W\n"
- + "\027function_calling_config\030\001 \001(\01321.goo"
- + "gle.cloud.aiplatform.v1.FunctionCallingConfigB\003\340A\001\022J\n"
- + "\020retrieval_config\030\002 \001(\0132+.g"
- + "oogle.cloud.aiplatform.v1.RetrievalConfigB\003\340A\001\"\204\002\n"
+ + "\027function_calling_config\030\001 \001(\0132"
+ + "1.google.cloud.aiplatform.v1.FunctionCallingConfigB\003\340A\001\022J\n"
+ + "\020retrieval_config\030\002 \001("
+ + "\0132+.google.cloud.aiplatform.v1.RetrievalConfigB\003\340A\001\"\204\002\n"
+ "\025FunctionCallingConfig\022I\n"
+ "\004mode\030\001"
+ " \001(\01626.google.cloud.aiplatform.v1.FunctionCallingConfig.ModeB\003\340A\001\022#\n"
@@ -374,10 +382,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\017metadata_filter\030\002 \001(\tB\003\340A\001B\025\n"
+ "\023vector_db_threshold\032\317\002\n"
+ "\007Ranking\022_\n"
- + "\014rank_service\030\001 \001(\0132B.google.cloud.aiplatform.v1."
- + "RagRetrievalConfig.Ranking.RankServiceB\003\340A\001H\000\022[\n\n"
- + "llm_ranker\030\003 \001(\0132@.google.cloud"
- + ".aiplatform.v1.RagRetrievalConfig.Ranking.LlmRankerB\003\340A\001H\000\032:\n"
+ + "\014rank_service\030\001 \001(\0132B.google.cloud.aiplatfor"
+ + "m.v1.RagRetrievalConfig.Ranking.RankServiceB\003\340A\001H\000\022[\n\n"
+ + "llm_ranker\030\003 \001(\0132@.google."
+ + "cloud.aiplatform.v1.RagRetrievalConfig.Ranking.LlmRankerB\003\340A\001H\000\032:\n"
+ "\013RankService\022\034\n\n"
+ "model_name\030\001 \001(\tB\003\340A\001H\000\210\001\001B\r\n"
+ "\013_model_name\0328\n"
@@ -385,11 +393,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "model_name\030\001 \001(\tB\003\340A\001H\000\210\001\001B\r\n"
+ "\013_model_nameB\020\n"
+ "\016ranking_configB\307\001\n"
- + "\036com.google.cloud.aiplatform.v1B\tToolProto"
- + "P\001Z>cloud.google.com/go/aiplatform/apiv1"
- + "/aiplatformpb;aiplatformpb\252\002\032Google.Clou"
- + "d.AIPlatform.V1\312\002\032Google\\Cloud\\AIPlatfor"
- + "m\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006proto3"
+ + "\036com.google.cloud.aiplatform.v1B\tToolProtoP\001Z>cloud.google.com/go/aiplatform/"
+ + "apiv1/aiplatformpb;aiplatformpb\252\002\032Google"
+ + ".Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPl"
+ + "atform\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -413,6 +420,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"GoogleMaps",
"EnterpriseWebSearch",
"ParallelAiSearch",
+ "ExaAiSearch",
"CodeExecution",
"UrlContext",
"ComputerUse",
@@ -433,14 +441,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new java.lang.String[] {
"ApiKey", "CustomConfigs",
});
- internal_static_google_cloud_aiplatform_v1_Tool_CodeExecution_descriptor =
+ internal_static_google_cloud_aiplatform_v1_Tool_ExaAiSearch_descriptor =
internal_static_google_cloud_aiplatform_v1_Tool_descriptor.getNestedType(2);
+ internal_static_google_cloud_aiplatform_v1_Tool_ExaAiSearch_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_google_cloud_aiplatform_v1_Tool_ExaAiSearch_descriptor,
+ new java.lang.String[] {
+ "ApiKey", "CustomConfigs",
+ });
+ internal_static_google_cloud_aiplatform_v1_Tool_CodeExecution_descriptor =
+ internal_static_google_cloud_aiplatform_v1_Tool_descriptor.getNestedType(3);
internal_static_google_cloud_aiplatform_v1_Tool_CodeExecution_fieldAccessorTable =
new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_google_cloud_aiplatform_v1_Tool_CodeExecution_descriptor,
new java.lang.String[] {});
internal_static_google_cloud_aiplatform_v1_Tool_ComputerUse_descriptor =
- internal_static_google_cloud_aiplatform_v1_Tool_descriptor.getNestedType(3);
+ internal_static_google_cloud_aiplatform_v1_Tool_descriptor.getNestedType(4);
internal_static_google_cloud_aiplatform_v1_Tool_ComputerUse_fieldAccessorTable =
new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_google_cloud_aiplatform_v1_Tool_ComputerUse_descriptor,
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/VertexRagStore.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/VertexRagStore.java
index 600276ca07af..b3e272713853 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/VertexRagStore.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/VertexRagStore.java
@@ -1195,7 +1195,7 @@ public com.google.cloud.aiplatform.v1.VertexRagStore.RagResource getRagResources
*
*
* @deprecated google.cloud.aiplatform.v1.VertexRagStore.similarity_top_k is deprecated. See
- * google/cloud/aiplatform/v1/tool.proto;l=494
+ * google/cloud/aiplatform/v1/tool.proto;l=511
* @return Whether the similarityTopK field is set.
*/
@java.lang.Override
@@ -1216,7 +1216,7 @@ public boolean hasSimilarityTopK() {
*
*
* @deprecated google.cloud.aiplatform.v1.VertexRagStore.similarity_top_k is deprecated. See
- * google/cloud/aiplatform/v1/tool.proto;l=494
+ * google/cloud/aiplatform/v1/tool.proto;l=511
* @return The similarityTopK.
*/
@java.lang.Override
@@ -1241,7 +1241,7 @@ public int getSimilarityTopK() {
*
*
* @deprecated google.cloud.aiplatform.v1.VertexRagStore.vector_distance_threshold is deprecated.
- * See google/cloud/aiplatform/v1/tool.proto;l=499
+ * See google/cloud/aiplatform/v1/tool.proto;l=516
* @return Whether the vectorDistanceThreshold field is set.
*/
@java.lang.Override
@@ -1263,7 +1263,7 @@ public boolean hasVectorDistanceThreshold() {
*
*
* @deprecated google.cloud.aiplatform.v1.VertexRagStore.vector_distance_threshold is deprecated.
- * See google/cloud/aiplatform/v1/tool.proto;l=499
+ * See google/cloud/aiplatform/v1/tool.proto;l=516
* @return The vectorDistanceThreshold.
*/
@java.lang.Override
@@ -2285,7 +2285,7 @@ public com.google.cloud.aiplatform.v1.VertexRagStore.RagResource.Builder addRagR
*
*
* @deprecated google.cloud.aiplatform.v1.VertexRagStore.similarity_top_k is deprecated. See
- * google/cloud/aiplatform/v1/tool.proto;l=494
+ * google/cloud/aiplatform/v1/tool.proto;l=511
* @return Whether the similarityTopK field is set.
*/
@java.lang.Override
@@ -2306,7 +2306,7 @@ public boolean hasSimilarityTopK() {
*
*
* @deprecated google.cloud.aiplatform.v1.VertexRagStore.similarity_top_k is deprecated. See
- * google/cloud/aiplatform/v1/tool.proto;l=494
+ * google/cloud/aiplatform/v1/tool.proto;l=511
* @return The similarityTopK.
*/
@java.lang.Override
@@ -2327,7 +2327,7 @@ public int getSimilarityTopK() {
*
*
* @deprecated google.cloud.aiplatform.v1.VertexRagStore.similarity_top_k is deprecated. See
- * google/cloud/aiplatform/v1/tool.proto;l=494
+ * google/cloud/aiplatform/v1/tool.proto;l=511
* @param value The similarityTopK to set.
* @return This builder for chaining.
*/
@@ -2352,7 +2352,7 @@ public Builder setSimilarityTopK(int value) {
*
*
* @deprecated google.cloud.aiplatform.v1.VertexRagStore.similarity_top_k is deprecated. See
- * google/cloud/aiplatform/v1/tool.proto;l=494
+ * google/cloud/aiplatform/v1/tool.proto;l=511
* @return This builder for chaining.
*/
@java.lang.Deprecated
@@ -2378,7 +2378,7 @@ public Builder clearSimilarityTopK() {
*
*
* @deprecated google.cloud.aiplatform.v1.VertexRagStore.vector_distance_threshold is
- * deprecated. See google/cloud/aiplatform/v1/tool.proto;l=499
+ * deprecated. See google/cloud/aiplatform/v1/tool.proto;l=516
* @return Whether the vectorDistanceThreshold field is set.
*/
@java.lang.Override
@@ -2400,7 +2400,7 @@ public boolean hasVectorDistanceThreshold() {
*
*
* @deprecated google.cloud.aiplatform.v1.VertexRagStore.vector_distance_threshold is
- * deprecated. See google/cloud/aiplatform/v1/tool.proto;l=499
+ * deprecated. See google/cloud/aiplatform/v1/tool.proto;l=516
* @return The vectorDistanceThreshold.
*/
@java.lang.Override
@@ -2422,7 +2422,7 @@ public double getVectorDistanceThreshold() {
*
*
* @deprecated google.cloud.aiplatform.v1.VertexRagStore.vector_distance_threshold is
- * deprecated. See google/cloud/aiplatform/v1/tool.proto;l=499
+ * deprecated. See google/cloud/aiplatform/v1/tool.proto;l=516
* @param value The vectorDistanceThreshold to set.
* @return This builder for chaining.
*/
@@ -2448,7 +2448,7 @@ public Builder setVectorDistanceThreshold(double value) {
*
*
* @deprecated google.cloud.aiplatform.v1.VertexRagStore.vector_distance_threshold is
- * deprecated. See google/cloud/aiplatform/v1/tool.proto;l=499
+ * deprecated. See google/cloud/aiplatform/v1/tool.proto;l=516
* @return This builder for chaining.
*/
@java.lang.Deprecated
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/VertexRagStoreOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/VertexRagStoreOrBuilder.java
index deab629022f8..0f16887b43f1 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/VertexRagStoreOrBuilder.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/VertexRagStoreOrBuilder.java
@@ -120,7 +120,7 @@ com.google.cloud.aiplatform.v1.VertexRagStore.RagResourceOrBuilder getRagResourc
*
*
* @deprecated google.cloud.aiplatform.v1.VertexRagStore.similarity_top_k is deprecated. See
- * google/cloud/aiplatform/v1/tool.proto;l=494
+ * google/cloud/aiplatform/v1/tool.proto;l=511
* @return Whether the similarityTopK field is set.
*/
@java.lang.Deprecated
@@ -138,7 +138,7 @@ com.google.cloud.aiplatform.v1.VertexRagStore.RagResourceOrBuilder getRagResourc
*
*
* @deprecated google.cloud.aiplatform.v1.VertexRagStore.similarity_top_k is deprecated. See
- * google/cloud/aiplatform/v1/tool.proto;l=494
+ * google/cloud/aiplatform/v1/tool.proto;l=511
* @return The similarityTopK.
*/
@java.lang.Deprecated
@@ -157,7 +157,7 @@ com.google.cloud.aiplatform.v1.VertexRagStore.RagResourceOrBuilder getRagResourc
*
*
* @deprecated google.cloud.aiplatform.v1.VertexRagStore.vector_distance_threshold is deprecated.
- * See google/cloud/aiplatform/v1/tool.proto;l=499
+ * See google/cloud/aiplatform/v1/tool.proto;l=516
* @return Whether the vectorDistanceThreshold field is set.
*/
@java.lang.Deprecated
@@ -176,7 +176,7 @@ com.google.cloud.aiplatform.v1.VertexRagStore.RagResourceOrBuilder getRagResourc
*
*
* @deprecated google.cloud.aiplatform.v1.VertexRagStore.vector_distance_threshold is deprecated.
- * See google/cloud/aiplatform/v1/tool.proto;l=499
+ * See google/cloud/aiplatform/v1/tool.proto;l=516
* @return The vectorDistanceThreshold.
*/
@java.lang.Deprecated
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/tool.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/tool.proto
index a5d730aefda1..2415de9f2047 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/tool.proto
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/tool.proto
@@ -110,6 +110,18 @@ message Tool {
[(google.api.field_behavior) = OPTIONAL];
}
+ // ExaAiSearch tool type.
+ // A tool that uses the Exa.ai search engine for grounding.
+ message ExaAiSearch {
+ // Required. The API key for ExaAiSearch.
+ string api_key = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // Optional. This field can be used to pass any parameter from the Exa.ai
+ // Search API.
+ google.protobuf.Struct custom_configs = 2
+ [(google.api.field_behavior) = OPTIONAL];
+ }
+
// Tool that executes code generated by the model, and automatically returns
// the result to the model.
//
@@ -183,6 +195,11 @@ message Tool {
ParallelAiSearch parallel_ai_search = 13
[(google.api.field_behavior) = OPTIONAL];
+ // Optional. Uses Exa.ai to search for information to
+ // answer user queries. The search results will be grounded on Exa.ai
+ // and presented to the model for response generation
+ ExaAiSearch exa_ai_search = 15 [(google.api.field_behavior) = OPTIONAL];
+
// Optional. CodeExecution tool type.
// Enables the model to execute code as part of generation.
CodeExecution code_execution = 4 [(google.api.field_behavior) = OPTIONAL];
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Retrieval.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Retrieval.java
index b48736e19d89..d06019fcc621 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Retrieval.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Retrieval.java
@@ -244,7 +244,7 @@ public com.google.cloud.aiplatform.v1beta1.VertexRagStoreOrBuilder getVertexRagS
*
*
* @deprecated google.cloud.aiplatform.v1beta1.Retrieval.disable_attribution is deprecated. See
- * google/cloud/aiplatform/v1beta1/tool.proto;l=510
+ * google/cloud/aiplatform/v1beta1/tool.proto;l=527
* @return The disableAttribution.
*/
@java.lang.Override
@@ -1124,7 +1124,7 @@ public com.google.cloud.aiplatform.v1beta1.VertexRagStore.Builder getVertexRagSt
*
*
* @deprecated google.cloud.aiplatform.v1beta1.Retrieval.disable_attribution is deprecated. See
- * google/cloud/aiplatform/v1beta1/tool.proto;l=510
+ * google/cloud/aiplatform/v1beta1/tool.proto;l=527
* @return The disableAttribution.
*/
@java.lang.Override
@@ -1145,7 +1145,7 @@ public boolean getDisableAttribution() {
*
*
* @deprecated google.cloud.aiplatform.v1beta1.Retrieval.disable_attribution is deprecated. See
- * google/cloud/aiplatform/v1beta1/tool.proto;l=510
+ * google/cloud/aiplatform/v1beta1/tool.proto;l=527
* @param value The disableAttribution to set.
* @return This builder for chaining.
*/
@@ -1170,7 +1170,7 @@ public Builder setDisableAttribution(boolean value) {
*
*
* @deprecated google.cloud.aiplatform.v1beta1.Retrieval.disable_attribution is deprecated. See
- * google/cloud/aiplatform/v1beta1/tool.proto;l=510
+ * google/cloud/aiplatform/v1beta1/tool.proto;l=527
* @return This builder for chaining.
*/
@java.lang.Deprecated
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrievalOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrievalOrBuilder.java
index c52be8481a9e..f4dff19b84af 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrievalOrBuilder.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/RetrievalOrBuilder.java
@@ -115,7 +115,7 @@ public interface RetrievalOrBuilder
*
*
* @deprecated google.cloud.aiplatform.v1beta1.Retrieval.disable_attribution is deprecated. See
- * google/cloud/aiplatform/v1beta1/tool.proto;l=510
+ * google/cloud/aiplatform/v1beta1/tool.proto;l=527
* @return The disableAttribution.
*/
@java.lang.Deprecated
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Tool.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Tool.java
index e18909f7d850..b2a0710b5ce8 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Tool.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Tool.java
@@ -2625,6 +2625,976 @@ public com.google.cloud.aiplatform.v1beta1.Tool.ParallelAiSearch getDefaultInsta
}
}
+ public interface ExaAiSearchOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ * + * Required. The API key for ExaAiSearch. + *+ * + *
string api_key = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The apiKey.
+ */
+ java.lang.String getApiKey();
+
+ /**
+ *
+ *
+ * + * Required. The API key for ExaAiSearch. + *+ * + *
string api_key = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for apiKey.
+ */
+ com.google.protobuf.ByteString getApiKeyBytes();
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the customConfigs field is set.
+ */
+ boolean hasCustomConfigs();
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The customConfigs.
+ */
+ com.google.protobuf.Struct getCustomConfigs();
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.protobuf.StructOrBuilder getCustomConfigsOrBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * ExaAiSearch tool type. + * A tool that uses the Exa.ai search engine for grounding. + *+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch} + */ + public static final class ExaAiSearch extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch) + ExaAiSearchOrBuilder { + 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= */ "", + "ExaAiSearch"); + } + + // Use ExaAiSearch.newBuilder() to construct. + private ExaAiSearch(com.google.protobuf.GeneratedMessage.Builder> builder) { + super(builder); + } + + private ExaAiSearch() { + apiKey_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_Tool_ExaAiSearch_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ToolProto + .internal_static_google_cloud_aiplatform_v1beta1_Tool_ExaAiSearch_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch.class, + com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch.Builder.class); + } + + private int bitField0_; + public static final int API_KEY_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object apiKey_ = ""; + + /** + * + * + *
+ * Required. The API key for ExaAiSearch. + *+ * + *
string api_key = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The apiKey.
+ */
+ @java.lang.Override
+ public java.lang.String getApiKey() {
+ java.lang.Object ref = apiKey_;
+ 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();
+ apiKey_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Required. The API key for ExaAiSearch. + *+ * + *
string api_key = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for apiKey.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getApiKeyBytes() {
+ java.lang.Object ref = apiKey_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ apiKey_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int CUSTOM_CONFIGS_FIELD_NUMBER = 2;
+ private com.google.protobuf.Struct customConfigs_;
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the customConfigs field is set.
+ */
+ @java.lang.Override
+ public boolean hasCustomConfigs() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The customConfigs.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Struct getCustomConfigs() {
+ return customConfigs_ == null
+ ? com.google.protobuf.Struct.getDefaultInstance()
+ : customConfigs_;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.protobuf.StructOrBuilder getCustomConfigsOrBuilder() {
+ return customConfigs_ == null
+ ? com.google.protobuf.Struct.getDefaultInstance()
+ : customConfigs_;
+ }
+
+ 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(apiKey_)) {
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, apiKey_);
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(2, getCustomConfigs());
+ }
+ 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(apiKey_)) {
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, apiKey_);
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCustomConfigs());
+ }
+ 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.aiplatform.v1beta1.Tool.ExaAiSearch)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch other =
+ (com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch) obj;
+
+ if (!getApiKey().equals(other.getApiKey())) return false;
+ if (hasCustomConfigs() != other.hasCustomConfigs()) return false;
+ if (hasCustomConfigs()) {
+ if (!getCustomConfigs().equals(other.getCustomConfigs())) 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) + API_KEY_FIELD_NUMBER;
+ hash = (53 * hash) + getApiKey().hashCode();
+ if (hasCustomConfigs()) {
+ hash = (37 * hash) + CUSTOM_CONFIGS_FIELD_NUMBER;
+ hash = (53 * hash) + getCustomConfigs().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch 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.aiplatform.v1beta1.Tool.ExaAiSearch parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch 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.aiplatform.v1beta1.Tool.ExaAiSearch parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch 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.aiplatform.v1beta1.Tool.ExaAiSearch parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch 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.aiplatform.v1beta1.Tool.ExaAiSearch parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch 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.aiplatform.v1beta1.Tool.ExaAiSearch 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;
+ }
+
+ /**
+ *
+ *
+ * + * ExaAiSearch tool type. + * A tool that uses the Exa.ai search engine for grounding. + *+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder
+ * Required. The API key for ExaAiSearch. + *+ * + *
string api_key = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The apiKey.
+ */
+ public java.lang.String getApiKey() {
+ java.lang.Object ref = apiKey_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ apiKey_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Required. The API key for ExaAiSearch. + *+ * + *
string api_key = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for apiKey.
+ */
+ public com.google.protobuf.ByteString getApiKeyBytes() {
+ java.lang.Object ref = apiKey_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ apiKey_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Required. The API key for ExaAiSearch. + *+ * + *
string api_key = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The apiKey to set.
+ * @return This builder for chaining.
+ */
+ public Builder setApiKey(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ apiKey_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Required. The API key for ExaAiSearch. + *+ * + *
string api_key = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearApiKey() {
+ apiKey_ = getDefaultInstance().getApiKey();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Required. The API key for ExaAiSearch. + *+ * + *
string api_key = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The bytes for apiKey to set.
+ * @return This builder for chaining.
+ */
+ public Builder setApiKeyBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ apiKey_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Struct customConfigs_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.protobuf.Struct,
+ com.google.protobuf.Struct.Builder,
+ com.google.protobuf.StructOrBuilder>
+ customConfigsBuilder_;
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the customConfigs field is set.
+ */
+ public boolean hasCustomConfigs() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The customConfigs.
+ */
+ public com.google.protobuf.Struct getCustomConfigs() {
+ if (customConfigsBuilder_ == null) {
+ return customConfigs_ == null
+ ? com.google.protobuf.Struct.getDefaultInstance()
+ : customConfigs_;
+ } else {
+ return customConfigsBuilder_.getMessage();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setCustomConfigs(com.google.protobuf.Struct value) {
+ if (customConfigsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ customConfigs_ = value;
+ } else {
+ customConfigsBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setCustomConfigs(com.google.protobuf.Struct.Builder builderForValue) {
+ if (customConfigsBuilder_ == null) {
+ customConfigs_ = builderForValue.build();
+ } else {
+ customConfigsBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeCustomConfigs(com.google.protobuf.Struct value) {
+ if (customConfigsBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0)
+ && customConfigs_ != null
+ && customConfigs_ != com.google.protobuf.Struct.getDefaultInstance()) {
+ getCustomConfigsBuilder().mergeFrom(value);
+ } else {
+ customConfigs_ = value;
+ }
+ } else {
+ customConfigsBuilder_.mergeFrom(value);
+ }
+ if (customConfigs_ != null) {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearCustomConfigs() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ customConfigs_ = null;
+ if (customConfigsBuilder_ != null) {
+ customConfigsBuilder_.dispose();
+ customConfigsBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.protobuf.Struct.Builder getCustomConfigsBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return internalGetCustomConfigsFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.protobuf.StructOrBuilder getCustomConfigsOrBuilder() {
+ if (customConfigsBuilder_ != null) {
+ return customConfigsBuilder_.getMessageOrBuilder();
+ } else {
+ return customConfigs_ == null
+ ? com.google.protobuf.Struct.getDefaultInstance()
+ : customConfigs_;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Optional. This field can be used to pass any parameter from the Exa.ai + * Search API. + *+ * + *
.google.protobuf.Struct custom_configs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.protobuf.Struct,
+ com.google.protobuf.Struct.Builder,
+ com.google.protobuf.StructOrBuilder>
+ internalGetCustomConfigsFieldBuilder() {
+ if (customConfigsBuilder_ == null) {
+ customConfigsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilder<
+ com.google.protobuf.Struct,
+ com.google.protobuf.Struct.Builder,
+ com.google.protobuf.StructOrBuilder>(
+ getCustomConfigs(), getParentForChildren(), isClean());
+ customConfigs_ = null;
+ }
+ return customConfigsBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch)
+ private static final com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch();
+ }
+
+ public static com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the exaAiSearch field is set.
+ */
+ @java.lang.Override
+ public boolean hasExaAiSearch() {
+ return ((bitField0_ & 0x00000040) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The exaAiSearch.
+ */
+ @java.lang.Override
+ public com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch getExaAiSearch() {
+ return exaAiSearch_ == null
+ ? com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch.getDefaultInstance()
+ : exaAiSearch_;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearchOrBuilder getExaAiSearchOrBuilder() {
+ return exaAiSearch_ == null
+ ? com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch.getDefaultInstance()
+ : exaAiSearch_;
+ }
+
public static final int CODE_EXECUTION_FIELD_NUMBER = 4;
private com.google.cloud.aiplatform.v1beta1.Tool.CodeExecution codeExecution_;
@@ -4773,7 +5808,7 @@ public com.google.cloud.aiplatform.v1beta1.Tool.ParallelAiSearch getParallelAiSe
*/
@java.lang.Override
public boolean hasCodeExecution() {
- return ((bitField0_ & 0x00000040) != 0);
+ return ((bitField0_ & 0x00000080) != 0);
}
/**
@@ -4835,7 +5870,7 @@ public com.google.cloud.aiplatform.v1beta1.Tool.CodeExecution getCodeExecution()
*/
@java.lang.Override
public boolean hasUrlContext() {
- return ((bitField0_ & 0x00000080) != 0);
+ return ((bitField0_ & 0x00000100) != 0);
}
/**
@@ -4896,7 +5931,7 @@ public com.google.cloud.aiplatform.v1beta1.UrlContextOrBuilder getUrlContextOrBu
*/
@java.lang.Override
public boolean hasComputerUse() {
- return ((bitField0_ & 0x00000100) != 0);
+ return ((bitField0_ & 0x00000200) != 0);
}
/**
@@ -4964,7 +5999,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(3, getGoogleSearchRetrieval());
}
- if (((bitField0_ & 0x00000040) != 0)) {
+ if (((bitField0_ & 0x00000080) != 0)) {
output.writeMessage(4, getCodeExecution());
}
if (((bitField0_ & 0x00000008) != 0)) {
@@ -4976,15 +6011,18 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(7, getGoogleSearch());
}
- if (((bitField0_ & 0x00000080) != 0)) {
+ if (((bitField0_ & 0x00000100) != 0)) {
output.writeMessage(10, getUrlContext());
}
- if (((bitField0_ & 0x00000100) != 0)) {
+ if (((bitField0_ & 0x00000200) != 0)) {
output.writeMessage(11, getComputerUse());
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeMessage(13, getParallelAiSearch());
}
+ if (((bitField0_ & 0x00000040) != 0)) {
+ output.writeMessage(15, getExaAiSearch());
+ }
getUnknownFields().writeTo(output);
}
@@ -5005,7 +6043,7 @@ public int getSerializedSize() {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(3, getGoogleSearchRetrieval());
}
- if (((bitField0_ & 0x00000040) != 0)) {
+ if (((bitField0_ & 0x00000080) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCodeExecution());
}
if (((bitField0_ & 0x00000008) != 0)) {
@@ -5017,15 +6055,18 @@ public int getSerializedSize() {
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getGoogleSearch());
}
- if (((bitField0_ & 0x00000080) != 0)) {
+ if (((bitField0_ & 0x00000100) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getUrlContext());
}
- if (((bitField0_ & 0x00000100) != 0)) {
+ if (((bitField0_ & 0x00000200) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getComputerUse());
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getParallelAiSearch());
}
+ if (((bitField0_ & 0x00000040) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getExaAiSearch());
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -5066,6 +6107,10 @@ public boolean equals(final java.lang.Object obj) {
if (hasParallelAiSearch()) {
if (!getParallelAiSearch().equals(other.getParallelAiSearch())) return false;
}
+ if (hasExaAiSearch() != other.hasExaAiSearch()) return false;
+ if (hasExaAiSearch()) {
+ if (!getExaAiSearch().equals(other.getExaAiSearch())) return false;
+ }
if (hasCodeExecution() != other.hasCodeExecution()) return false;
if (hasCodeExecution()) {
if (!getCodeExecution().equals(other.getCodeExecution())) return false;
@@ -5117,6 +6162,10 @@ public int hashCode() {
hash = (37 * hash) + PARALLEL_AI_SEARCH_FIELD_NUMBER;
hash = (53 * hash) + getParallelAiSearch().hashCode();
}
+ if (hasExaAiSearch()) {
+ hash = (37 * hash) + EXA_AI_SEARCH_FIELD_NUMBER;
+ hash = (53 * hash) + getExaAiSearch().hashCode();
+ }
if (hasCodeExecution()) {
hash = (37 * hash) + CODE_EXECUTION_FIELD_NUMBER;
hash = (53 * hash) + getCodeExecution().hashCode();
@@ -5283,6 +6332,7 @@ private void maybeForceBuilderInitialization() {
internalGetGoogleMapsFieldBuilder();
internalGetEnterpriseWebSearchFieldBuilder();
internalGetParallelAiSearchFieldBuilder();
+ internalGetExaAiSearchFieldBuilder();
internalGetCodeExecutionFieldBuilder();
internalGetUrlContextFieldBuilder();
internalGetComputerUseFieldBuilder();
@@ -5330,6 +6380,11 @@ public Builder clear() {
parallelAiSearchBuilder_.dispose();
parallelAiSearchBuilder_ = null;
}
+ exaAiSearch_ = null;
+ if (exaAiSearchBuilder_ != null) {
+ exaAiSearchBuilder_.dispose();
+ exaAiSearchBuilder_ = null;
+ }
codeExecution_ = null;
if (codeExecutionBuilder_ != null) {
codeExecutionBuilder_.dispose();
@@ -5428,18 +6483,23 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.Tool result) {
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
- result.codeExecution_ =
- codeExecutionBuilder_ == null ? codeExecution_ : codeExecutionBuilder_.build();
+ result.exaAiSearch_ =
+ exaAiSearchBuilder_ == null ? exaAiSearch_ : exaAiSearchBuilder_.build();
to_bitField0_ |= 0x00000040;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
- result.urlContext_ = urlContextBuilder_ == null ? urlContext_ : urlContextBuilder_.build();
+ result.codeExecution_ =
+ codeExecutionBuilder_ == null ? codeExecution_ : codeExecutionBuilder_.build();
to_bitField0_ |= 0x00000080;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
+ result.urlContext_ = urlContextBuilder_ == null ? urlContext_ : urlContextBuilder_.build();
+ to_bitField0_ |= 0x00000100;
+ }
+ if (((from_bitField0_ & 0x00000400) != 0)) {
result.computerUse_ =
computerUseBuilder_ == null ? computerUse_ : computerUseBuilder_.build();
- to_bitField0_ |= 0x00000100;
+ to_bitField0_ |= 0x00000200;
}
result.bitField0_ |= to_bitField0_;
}
@@ -5501,6 +6561,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.Tool other) {
if (other.hasParallelAiSearch()) {
mergeParallelAiSearch(other.getParallelAiSearch());
}
+ if (other.hasExaAiSearch()) {
+ mergeExaAiSearch(other.getExaAiSearch());
+ }
if (other.hasCodeExecution()) {
mergeCodeExecution(other.getCodeExecution());
}
@@ -5568,7 +6631,7 @@ public Builder mergeFrom(
{
input.readMessage(
internalGetCodeExecutionFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000080;
+ bitField0_ |= 0x00000100;
break;
} // case 34
case 42:
@@ -5596,14 +6659,14 @@ public Builder mergeFrom(
{
input.readMessage(
internalGetUrlContextFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000100;
+ bitField0_ |= 0x00000200;
break;
} // case 82
case 90:
{
input.readMessage(
internalGetComputerUseFieldBuilder().getBuilder(), extensionRegistry);
- bitField0_ |= 0x00000200;
+ bitField0_ |= 0x00000400;
break;
} // case 90
case 106:
@@ -5613,6 +6676,13 @@ public Builder mergeFrom(
bitField0_ |= 0x00000040;
break;
} // case 106
+ case 122:
+ {
+ input.readMessage(
+ internalGetExaAiSearchFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000080;
+ break;
+ } // case 122
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -7592,6 +8662,238 @@ public Builder clearParallelAiSearch() {
return parallelAiSearchBuilder_;
}
+ private com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch exaAiSearch_;
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch,
+ com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch.Builder,
+ com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearchOrBuilder>
+ exaAiSearchBuilder_;
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the exaAiSearch field is set.
+ */
+ public boolean hasExaAiSearch() {
+ return ((bitField0_ & 0x00000080) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The exaAiSearch.
+ */
+ public com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch getExaAiSearch() {
+ if (exaAiSearchBuilder_ == null) {
+ return exaAiSearch_ == null
+ ? com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch.getDefaultInstance()
+ : exaAiSearch_;
+ } else {
+ return exaAiSearchBuilder_.getMessage();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setExaAiSearch(com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch value) {
+ if (exaAiSearchBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ exaAiSearch_ = value;
+ } else {
+ exaAiSearchBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setExaAiSearch(
+ com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch.Builder builderForValue) {
+ if (exaAiSearchBuilder_ == null) {
+ exaAiSearch_ = builderForValue.build();
+ } else {
+ exaAiSearchBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeExaAiSearch(com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch value) {
+ if (exaAiSearchBuilder_ == null) {
+ if (((bitField0_ & 0x00000080) != 0)
+ && exaAiSearch_ != null
+ && exaAiSearch_
+ != com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch.getDefaultInstance()) {
+ getExaAiSearchBuilder().mergeFrom(value);
+ } else {
+ exaAiSearch_ = value;
+ }
+ } else {
+ exaAiSearchBuilder_.mergeFrom(value);
+ }
+ if (exaAiSearch_ != null) {
+ bitField0_ |= 0x00000080;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearExaAiSearch() {
+ bitField0_ = (bitField0_ & ~0x00000080);
+ exaAiSearch_ = null;
+ if (exaAiSearchBuilder_ != null) {
+ exaAiSearchBuilder_.dispose();
+ exaAiSearchBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch.Builder getExaAiSearchBuilder() {
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return internalGetExaAiSearchFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearchOrBuilder getExaAiSearchOrBuilder() {
+ if (exaAiSearchBuilder_ != null) {
+ return exaAiSearchBuilder_.getMessageOrBuilder();
+ } else {
+ return exaAiSearch_ == null
+ ? com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch.getDefaultInstance()
+ : exaAiSearch_;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch,
+ com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch.Builder,
+ com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearchOrBuilder>
+ internalGetExaAiSearchFieldBuilder() {
+ if (exaAiSearchBuilder_ == null) {
+ exaAiSearchBuilder_ =
+ new com.google.protobuf.SingleFieldBuilder<
+ com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch,
+ com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch.Builder,
+ com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearchOrBuilder>(
+ getExaAiSearch(), getParentForChildren(), isClean());
+ exaAiSearch_ = null;
+ }
+ return exaAiSearchBuilder_;
+ }
+
private com.google.cloud.aiplatform.v1beta1.Tool.CodeExecution codeExecution_;
private com.google.protobuf.SingleFieldBuilder<
com.google.cloud.aiplatform.v1beta1.Tool.CodeExecution,
@@ -7614,7 +8916,7 @@ public Builder clearParallelAiSearch() {
* @return Whether the codeExecution field is set.
*/
public boolean hasCodeExecution() {
- return ((bitField0_ & 0x00000080) != 0);
+ return ((bitField0_ & 0x00000100) != 0);
}
/**
@@ -7662,7 +8964,7 @@ public Builder setCodeExecution(com.google.cloud.aiplatform.v1beta1.Tool.CodeExe
} else {
codeExecutionBuilder_.setMessage(value);
}
- bitField0_ |= 0x00000080;
+ bitField0_ |= 0x00000100;
onChanged();
return this;
}
@@ -7686,7 +8988,7 @@ public Builder setCodeExecution(
} else {
codeExecutionBuilder_.setMessage(builderForValue.build());
}
- bitField0_ |= 0x00000080;
+ bitField0_ |= 0x00000100;
onChanged();
return this;
}
@@ -7706,7 +9008,7 @@ public Builder setCodeExecution(
public Builder mergeCodeExecution(
com.google.cloud.aiplatform.v1beta1.Tool.CodeExecution value) {
if (codeExecutionBuilder_ == null) {
- if (((bitField0_ & 0x00000080) != 0)
+ if (((bitField0_ & 0x00000100) != 0)
&& codeExecution_ != null
&& codeExecution_
!= com.google.cloud.aiplatform.v1beta1.Tool.CodeExecution.getDefaultInstance()) {
@@ -7718,7 +9020,7 @@ public Builder mergeCodeExecution(
codeExecutionBuilder_.mergeFrom(value);
}
if (codeExecution_ != null) {
- bitField0_ |= 0x00000080;
+ bitField0_ |= 0x00000100;
onChanged();
}
return this;
@@ -7737,7 +9039,7 @@ public Builder mergeCodeExecution(
*
*/
public Builder clearCodeExecution() {
- bitField0_ = (bitField0_ & ~0x00000080);
+ bitField0_ = (bitField0_ & ~0x00000100);
codeExecution_ = null;
if (codeExecutionBuilder_ != null) {
codeExecutionBuilder_.dispose();
@@ -7761,7 +9063,7 @@ public Builder clearCodeExecution() {
*/
public com.google.cloud.aiplatform.v1beta1.Tool.CodeExecution.Builder
getCodeExecutionBuilder() {
- bitField0_ |= 0x00000080;
+ bitField0_ |= 0x00000100;
onChanged();
return internalGetCodeExecutionFieldBuilder().getBuilder();
}
@@ -7839,7 +9141,7 @@ public Builder clearCodeExecution() {
* @return Whether the urlContext field is set.
*/
public boolean hasUrlContext() {
- return ((bitField0_ & 0x00000100) != 0);
+ return ((bitField0_ & 0x00000200) != 0);
}
/**
@@ -7885,7 +9187,7 @@ public Builder setUrlContext(com.google.cloud.aiplatform.v1beta1.UrlContext valu
} else {
urlContextBuilder_.setMessage(value);
}
- bitField0_ |= 0x00000100;
+ bitField0_ |= 0x00000200;
onChanged();
return this;
}
@@ -7908,7 +9210,7 @@ public Builder setUrlContext(
} else {
urlContextBuilder_.setMessage(builderForValue.build());
}
- bitField0_ |= 0x00000100;
+ bitField0_ |= 0x00000200;
onChanged();
return this;
}
@@ -7926,7 +9228,7 @@ public Builder setUrlContext(
*/
public Builder mergeUrlContext(com.google.cloud.aiplatform.v1beta1.UrlContext value) {
if (urlContextBuilder_ == null) {
- if (((bitField0_ & 0x00000100) != 0)
+ if (((bitField0_ & 0x00000200) != 0)
&& urlContext_ != null
&& urlContext_ != com.google.cloud.aiplatform.v1beta1.UrlContext.getDefaultInstance()) {
getUrlContextBuilder().mergeFrom(value);
@@ -7937,7 +9239,7 @@ public Builder mergeUrlContext(com.google.cloud.aiplatform.v1beta1.UrlContext va
urlContextBuilder_.mergeFrom(value);
}
if (urlContext_ != null) {
- bitField0_ |= 0x00000100;
+ bitField0_ |= 0x00000200;
onChanged();
}
return this;
@@ -7955,7 +9257,7 @@ public Builder mergeUrlContext(com.google.cloud.aiplatform.v1beta1.UrlContext va
*
*/
public Builder clearUrlContext() {
- bitField0_ = (bitField0_ & ~0x00000100);
+ bitField0_ = (bitField0_ & ~0x00000200);
urlContext_ = null;
if (urlContextBuilder_ != null) {
urlContextBuilder_.dispose();
@@ -7977,7 +9279,7 @@ public Builder clearUrlContext() {
*
*/
public com.google.cloud.aiplatform.v1beta1.UrlContext.Builder getUrlContextBuilder() {
- bitField0_ |= 0x00000100;
+ bitField0_ |= 0x00000200;
onChanged();
return internalGetUrlContextFieldBuilder().getBuilder();
}
@@ -8054,7 +9356,7 @@ public com.google.cloud.aiplatform.v1beta1.UrlContextOrBuilder getUrlContextOrBu
* @return Whether the computerUse field is set.
*/
public boolean hasComputerUse() {
- return ((bitField0_ & 0x00000200) != 0);
+ return ((bitField0_ & 0x00000400) != 0);
}
/**
@@ -8104,7 +9406,7 @@ public Builder setComputerUse(com.google.cloud.aiplatform.v1beta1.Tool.ComputerU
} else {
computerUseBuilder_.setMessage(value);
}
- bitField0_ |= 0x00000200;
+ bitField0_ |= 0x00000400;
onChanged();
return this;
}
@@ -8129,7 +9431,7 @@ public Builder setComputerUse(
} else {
computerUseBuilder_.setMessage(builderForValue.build());
}
- bitField0_ |= 0x00000200;
+ bitField0_ |= 0x00000400;
onChanged();
return this;
}
@@ -8149,7 +9451,7 @@ public Builder setComputerUse(
*/
public Builder mergeComputerUse(com.google.cloud.aiplatform.v1beta1.Tool.ComputerUse value) {
if (computerUseBuilder_ == null) {
- if (((bitField0_ & 0x00000200) != 0)
+ if (((bitField0_ & 0x00000400) != 0)
&& computerUse_ != null
&& computerUse_
!= com.google.cloud.aiplatform.v1beta1.Tool.ComputerUse.getDefaultInstance()) {
@@ -8161,7 +9463,7 @@ public Builder mergeComputerUse(com.google.cloud.aiplatform.v1beta1.Tool.Compute
computerUseBuilder_.mergeFrom(value);
}
if (computerUse_ != null) {
- bitField0_ |= 0x00000200;
+ bitField0_ |= 0x00000400;
onChanged();
}
return this;
@@ -8181,7 +9483,7 @@ public Builder mergeComputerUse(com.google.cloud.aiplatform.v1beta1.Tool.Compute
*
*/
public Builder clearComputerUse() {
- bitField0_ = (bitField0_ & ~0x00000200);
+ bitField0_ = (bitField0_ & ~0x00000400);
computerUse_ = null;
if (computerUseBuilder_ != null) {
computerUseBuilder_.dispose();
@@ -8205,7 +9507,7 @@ public Builder clearComputerUse() {
*
*/
public com.google.cloud.aiplatform.v1beta1.Tool.ComputerUse.Builder getComputerUseBuilder() {
- bitField0_ |= 0x00000200;
+ bitField0_ |= 0x00000400;
onChanged();
return internalGetComputerUseFieldBuilder().getBuilder();
}
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolOrBuilder.java
index bbdfcc111c4d..6c91e25b2433 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolOrBuilder.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolOrBuilder.java
@@ -426,6 +426,55 @@ com.google.cloud.aiplatform.v1beta1.FunctionDeclarationOrBuilder getFunctionDecl
*/
com.google.cloud.aiplatform.v1beta1.Tool.ParallelAiSearchOrBuilder getParallelAiSearchOrBuilder();
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the exaAiSearch field is set.
+ */
+ boolean hasExaAiSearch();
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The exaAiSearch.
+ */
+ com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch getExaAiSearch();
+
+ /**
+ *
+ *
+ * + * Optional. Uses Exa.ai to search for information to + * answer user queries. The search results will be grounded on Exa.ai + * and presented to the model for response generation + *+ * + *
+ * .google.cloud.aiplatform.v1beta1.Tool.ExaAiSearch exa_ai_search = 15 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearchOrBuilder getExaAiSearchOrBuilder();
+
/**
*
*
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolProto.java
index 9fe030d06862..c419747cf4ff 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolProto.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ToolProto.java
@@ -52,6 +52,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_cloud_aiplatform_v1beta1_Tool_ParallelAiSearch_descriptor;
static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_google_cloud_aiplatform_v1beta1_Tool_ParallelAiSearch_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_aiplatform_v1beta1_Tool_ExaAiSearch_descriptor;
+ static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_google_cloud_aiplatform_v1beta1_Tool_ExaAiSearch_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_cloud_aiplatform_v1beta1_Tool_CodeExecution_descriptor;
static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
@@ -195,7 +199,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "oogle/api/field_behavior.proto\032\031google/a"
+ "pi/resource.proto\032-google/cloud/aiplatfo"
+ "rm/v1beta1/openapi.proto\032\034google/protobu"
- + "f/struct.proto\032\030google/type/latlng.proto\"\233\014\n"
+ + "f/struct.proto\032\030google/type/latlng.proto\"\305\r\n"
+ "\004Tool\022X\n"
+ "\025function_declarations\030\001 \003(\013"
+ "24.google.cloud.aiplatform.v1beta1.FunctionDeclarationB\003\340A\001\022B\n"
@@ -210,7 +214,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\025enterprise_web_search\030\006 "
+ "\001(\01324.google.cloud.aiplatform.v1beta1.EnterpriseWebSearchB\003\340A\001\022W\n"
+ "\022parallel_ai_search\030\r"
- + " \001(\01326.google.cloud.aiplatform.v1beta1.Tool.ParallelAiSearchB\003\340A\001\022P\n"
+ + " \001(\01326.google.cloud.aiplatform.v1beta1.Tool.ParallelAiSearchB\003\340A\001\022M\n\r"
+ + "exa_ai_search\030\017"
+ + " \001(\01321.google.cloud.aiplatform.v1beta1.Tool.ExaAiSearchB\003\340A\001\022P\n"
+ "\016code_execution\030\004"
+ " \001(\01323.google.cloud.aiplatform.v1beta1.Tool.CodeExecutionB\003\340A\001\022E\n"
+ "\013url_context\030\n"
@@ -219,17 +225,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ " \001(\01321.google.cloud.aiplatform.v1beta1.Tool.ComputerUseB\003\340A\001\032\246\001\n"
+ "\014GoogleSearch\022\034\n"
+ "\017exclude_domains\030\003 \003(\tB\003\340A\001\022`\n"
- + "\023blocking_confidence\030\004 \001(\01629.google.cloud.aiplat"
- + "form.v1beta1.Tool.PhishBlockThresholdB\003\340A\001H\000\210\001\001B\026\n"
+ + "\023blocking_confidence\030\004 \001(\01629.google.cloud.aiplatf"
+ + "orm.v1beta1.Tool.PhishBlockThresholdB\003\340A\001H\000\210\001\001B\026\n"
+ "\024_blocking_confidence\032^\n"
+ "\020ParallelAiSearch\022\024\n"
+ "\007api_key\030\001 \001(\tB\003\340A\001\0224\n"
- + "\016custom_configs\030\003"
+ + "\016custom_configs\030\003 \001(\0132\027.google.protobuf.StructB\003\340A\001\032Y\n"
+ + "\013ExaAiSearch\022\024\n"
+ + "\007api_key\030\001 \001(\tB\003\340A\002\0224\n"
+ + "\016custom_configs\030\002"
+ " \001(\0132\027.google.protobuf.StructB\003\340A\001\032\017\n\r"
+ "CodeExecution\032\327\001\n"
+ "\013ComputerUse\022W\n"
- + "\013environment\030\001 \001(\0162=.google.cloud.aip"
- + "latform.v1beta1.Tool.ComputerUse.EnvironmentB\003\340A\002\022*\n"
+ + "\013environment\030\001 \001(\0162=.google"
+ + ".cloud.aiplatform.v1beta1.Tool.ComputerUse.EnvironmentB\003\340A\002\022*\n"
+ "\035excluded_predefined_functions\030\002 \003(\tB\003\340A\001\"C\n"
+ "\013Environment\022\033\n"
+ "\027ENVIRONMENT_UNSPECIFIED\020\000\022\027\n"
@@ -246,8 +255,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "UrlContext\"\260\003\n"
+ "\016ToolUseExample\022a\n"
+ "\023extension_operation\030\n"
- + " \001(\0132B.google.cl"
- + "oud.aiplatform.v1beta1.ToolUseExample.ExtensionOperationH\000\022\027\n\r"
+ + " \001(\0132B"
+ + ".google.cloud.aiplatform.v1beta1.ToolUseExample.ExtensionOperationH\000\022\027\n\r"
+ "function_name\030\013 \001(\tH\000\022\031\n"
+ "\014display_name\030\001 \001(\tB\003\340A\002\022\022\n"
+ "\005query\030\002 \001(\tB\003\340A\002\022/\n"
@@ -262,12 +271,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\023FunctionDeclaration\022\021\n"
+ "\004name\030\001 \001(\tB\003\340A\002\022\030\n"
+ "\013description\030\002 \001(\tB\003\340A\001\022@\n\n"
- + "parameters\030\003"
- + " \001(\0132\'.google.cloud.aiplatform.v1beta1.SchemaB\003\340A\001\022;\n"
+ + "parameters\030\003 \001(\0132\'.goo"
+ + "gle.cloud.aiplatform.v1beta1.SchemaB\003\340A\001\022;\n"
+ "\026parameters_json_schema\030\005"
+ " \001(\0132\026.google.protobuf.ValueB\003\340A\001\022>\n"
- + "\010response\030\004"
- + " \001(\0132\'.google.cloud.aiplatform.v1beta1.SchemaB\003\340A\001\0229\n"
+ + "\010response\030\004 \001(\0132"
+ + "\'.google.cloud.aiplatform.v1beta1.SchemaB\003\340A\001\0229\n"
+ "\024response_json_schema\030\006"
+ " \001(\0132\026.google.protobuf.ValueB\003\340A\001\"\302\001\n"
+ "\014FunctionCall\022\017\n"
@@ -287,10 +296,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "will_continue\030\006 \001(\010B\003\340A\001B\007\n"
+ "\005delta\"\274\001\n"
+ "\024FunctionResponsePart\022L\n"
- + "\013inline_data\030\001 \001(\01325.goog"
- + "le.cloud.aiplatform.v1beta1.FunctionResponseBlobH\000\022N\n"
- + "\tfile_data\030\002 \001(\01329.google.c"
- + "loud.aiplatform.v1beta1.FunctionResponseFileDataH\000B\006\n"
+ + "\013inline_data\030\001 "
+ + "\001(\01325.google.cloud.aiplatform.v1beta1.FunctionResponseBlobH\000\022N\n"
+ + "\tfile_data\030\002 \001(\0132"
+ + "9.google.cloud.aiplatform.v1beta1.FunctionResponseFileDataH\000B\006\n"
+ "\004data\"\\\n"
+ "\024FunctionResponseBlob\022\026\n"
+ "\tmime_type\030\001 \001(\tB\003\340A\002\022\021\n"
@@ -304,18 +313,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\002id\030\003 \001(\tB\003\340A\001\022\021\n"
+ "\004name\030\001 \001(\tB\003\340A\002\022.\n"
+ "\010response\030\002 \001(\0132\027.google.protobuf.StructB\003\340A\002\022I\n"
- + "\005parts\030\004"
- + " \003(\01325.google.cloud.aiplatform.v1beta1.FunctionResponsePartB\003\340A\001\"\246\001\n"
+ + "\005parts\030\004 \003(\01325.google.cloud."
+ + "aiplatform.v1beta1.FunctionResponsePartB\003\340A\001\"\246\001\n"
+ "\016ExecutableCode\022O\n"
- + "\010language\030\001 \001(\01628.google"
- + ".cloud.aiplatform.v1beta1.ExecutableCode.LanguageB\003\340A\002\022\021\n"
+ + "\010language\030\001 \001("
+ + "\01628.google.cloud.aiplatform.v1beta1.ExecutableCode.LanguageB\003\340A\002\022\021\n"
+ "\004code\030\002 \001(\tB\003\340A\002\"0\n"
+ "\010Language\022\030\n"
+ "\024LANGUAGE_UNSPECIFIED\020\000\022\n\n"
+ "\006PYTHON\020\001\"\345\001\n"
+ "\023CodeExecutionResult\022R\n"
- + "\007outcome\030\001"
- + " \001(\0162<.google.cloud.aiplatform.v1beta1.CodeExecutionResult.OutcomeB\003\340A\002\022\023\n"
+ + "\007outcome\030\001 \001(\0162<.google.cloud.aiplatform"
+ + ".v1beta1.CodeExecutionResult.OutcomeB\003\340A\002\022\023\n"
+ "\006output\030\002 \001(\tB\003\340A\001\"e\n"
+ "\007Outcome\022\027\n"
+ "\023OUTCOME_UNSPECIFIED\020\000\022\016\n\n"
@@ -323,22 +332,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\016OUTCOME_FAILED\020\002\022\035\n"
+ "\031OUTCOME_DEADLINE_EXCEEDED\020\003\"\323\001\n"
+ "\tRetrieval\022K\n"
- + "\020vertex_ai_search\030\002 \001(\0132/.go"
- + "ogle.cloud.aiplatform.v1beta1.VertexAISearchH\000\022K\n"
- + "\020vertex_rag_store\030\004 \001(\0132/.googl"
- + "e.cloud.aiplatform.v1beta1.VertexRagStoreH\000\022\"\n"
+ + "\020vertex_ai_search\030\002"
+ + " \001(\0132/.google.cloud.aiplatform.v1beta1.VertexAISearchH\000\022K\n"
+ + "\020vertex_rag_store\030\004 \001"
+ + "(\0132/.google.cloud.aiplatform.v1beta1.VertexRagStoreH\000\022\"\n"
+ "\023disable_attribution\030\003 \001(\010B\005\030\001\340A\001B\010\n"
+ "\006source\"\224\004\n"
+ "\016VertexRagStore\022B\n"
+ "\013rag_corpora\030\001 \003(\tB-\030\001\340A\001\372A%\n"
+ "#aiplatform.googleapis.com/RagCorpus\022W\n\r"
- + "rag_resources\030\004 \003(\0132"
- + ";.google.cloud.aiplatform.v1beta1.VertexRagStore.RagResourceB\003\340A\001\022$\n"
+ + "rag_resources\030\004"
+ + " \003(\0132;.google.cloud.aiplatform.v1beta1.VertexRagStore.RagResourceB\003\340A\001\022$\n"
+ "\020similarity_top_k\030\002 \001(\005B\005\030\001\340A\001H\000\210\001\001\022-\n"
+ "\031vector_distance_threshold\030\003"
+ " \001(\001B\005\030\001\340A\001H\001\210\001\001\022V\n"
- + "\024rag_retrieval_config\030\006 \001(\01323.google.cloud.aipl"
- + "atform.v1beta1.RagRetrievalConfigB\003\340A\001\022\032\n\r"
+ + "\024rag_retrieval_config\030\006 \001(\01323.google."
+ + "cloud.aiplatform.v1beta1.RagRetrievalConfigB\003\340A\001\022\032\n\r"
+ "store_context\030\007 \001(\010B\003\340A\001\032i\n"
+ "\013RagResource\022?\n\n"
+ "rag_corpus\030\001 \001(\tB+\340A\001\372A%\n"
@@ -351,37 +360,38 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\006engine\030\002 \001(\tB\003\340A\001\022\030\n"
+ "\013max_results\030\003 \001(\005B\003\340A\001\022\023\n"
+ "\006filter\030\004 \001(\tB\003\340A\001\022W\n"
- + "\020data_store_specs\030\005 \003("
- + "\0132=.google.cloud.aiplatform.v1beta1.VertexAISearch.DataStoreSpec\0328\n\r"
+ + "\020data_store_specs\030\005"
+ + " \003(\0132=.google.cloud.aiplatform.v1beta1.VertexAISearch.DataStoreSpec\0328\n\r"
+ "DataStoreSpec\022\022\n\n"
+ "data_store\030\001 \001(\t\022\023\n"
+ "\006filter\030\002 \001(\tB\003\340A\001\"r\n"
+ "\025GoogleSearchRetrieval\022Y\n"
- + "\030dynamic_retrieval_config\030\002 \001(\01327.google.cloud.aip"
- + "latform.v1beta1.DynamicRetrievalConfig\"(\n\n"
+ + "\030dynamic_retrieval_config\030\002 \001(\01327.google"
+ + ".cloud.aiplatform.v1beta1.DynamicRetrievalConfig\"(\n\n"
+ "GoogleMaps\022\032\n\r"
+ "enable_widget\030\001 \001(\010B\003\340A\001\"\255\001\n"
+ "\023EnterpriseWebSearch\022\034\n"
+ "\017exclude_domains\030\001 \003(\tB\003\340A\001\022`\n"
- + "\023blocking_confidence\030\004 "
- + "\001(\01629.google.cloud.aiplatform.v1beta1.Tool.PhishBlockThresholdB\003\340A\001H\000\210\001\001B\026\n"
+ + "\023blocking_confidence\030\004 \001(\01629.google.cloud.aiplatform."
+ + "v1beta1.Tool.PhishBlockThresholdB\003\340A\001H\000\210\001\001B\026\n"
+ "\024_blocking_confidence\"\317\001\n"
+ "\026DynamicRetrievalConfig\022J\n"
- + "\004mode\030\001 \001(\0162<.google.cloud.aiplatf"
- + "orm.v1beta1.DynamicRetrievalConfig.Mode\022#\n"
+ + "\004mode\030\001 \001(\0162<.google.clo"
+ + "ud.aiplatform.v1beta1.DynamicRetrievalConfig.Mode\022#\n"
+ "\021dynamic_threshold\030\002 \001(\002B\003\340A\001H\000\210\001\001\".\n"
+ "\004Mode\022\024\n"
+ "\020MODE_UNSPECIFIED\020\000\022\020\n"
+ "\014MODE_DYNAMIC\020\001B\024\n"
- + "\022_dynamic_threshold\"\273\001\n\n"
+ + "\022_dynamic_threshold\"\273\001\n"
+ + "\n"
+ "ToolConfig\022\\\n"
- + "\027function_calling_config\030\001 \001(\01326.goo"
- + "gle.cloud.aiplatform.v1beta1.FunctionCallingConfigB\003\340A\001\022O\n"
- + "\020retrieval_config\030\002 \001("
- + "\01320.google.cloud.aiplatform.v1beta1.RetrievalConfigB\003\340A\001\"\211\002\n"
+ + "\027function_calling_config\030\001"
+ + " \001(\01326.google.cloud.aiplatform.v1beta1.FunctionCallingConfigB\003\340A\001\022O\n"
+ + "\020retrieval_config\030\002"
+ + " \001(\01320.google.cloud.aiplatform.v1beta1.RetrievalConfigB\003\340A\001\"\211\002\n"
+ "\025FunctionCallingConfig\022N\n"
- + "\004mode\030\001 \001(\0162;.google.cloud.aiplatfo"
- + "rm.v1beta1.FunctionCallingConfig.ModeB\003\340A\001\022#\n"
+ + "\004mode\030\001 \001(\0162;.google.clou"
+ + "d.aiplatform.v1beta1.FunctionCallingConfig.ModeB\003\340A\001\022#\n"
+ "\026allowed_function_names\030\002 \003(\tB\003\340A\001\022+\n"
+ "\036stream_function_call_arguments\030\004 \001(\010B\003\340A\001\"N\n"
+ "\004Mode\022\024\n"
@@ -397,12 +407,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\016_language_code\"\317\006\n"
+ "\022RagRetrievalConfig\022\022\n"
+ "\005top_k\030\001 \001(\005B\003\340A\001\022\\\n\r"
- + "hybrid_search\030\002 \001(\0132@.google."
- + "cloud.aiplatform.v1beta1.RagRetrievalConfig.HybridSearchB\003\340A\001\022O\n"
- + "\006filter\030\003 \001(\0132:."
- + "google.cloud.aiplatform.v1beta1.RagRetrievalConfig.FilterB\003\340A\001\022Q\n"
- + "\007ranking\030\004 \001(\0132"
- + ";.google.cloud.aiplatform.v1beta1.RagRetrievalConfig.RankingB\003\340A\001\0321\n"
+ + "hybrid_search\030\002 \001(\013"
+ + "2@.google.cloud.aiplatform.v1beta1.RagRetrievalConfig.HybridSearchB\003\340A\001\022O\n"
+ + "\006filter\030\003"
+ + " \001(\0132:.google.cloud.aiplatform.v1beta1.RagRetrievalConfig.FilterB\003\340A\001\022Q\n"
+ + "\007ranking\030\004"
+ + " \001(\0132;.google.cloud.aiplatform.v1beta1.RagRetrievalConfig.RankingB\003\340A\001\0321\n"
+ "\014HybridSearch\022\027\n"
+ "\005alpha\030\001 \001(\002B\003\340A\001H\000\210\001\001B\010\n"
+ "\006_alpha\032\223\001\n"
@@ -412,10 +422,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\017metadata_filter\030\002 \001(\tB\003\340A\001B\025\n"
+ "\023vector_db_threshold\032\331\002\n"
+ "\007Ranking\022d\n"
- + "\014rank_service\030\001 \001(\0132G.google.cloud.aipl"
- + "atform.v1beta1.RagRetrievalConfig.Ranking.RankServiceB\003\340A\001H\000\022`\n\n"
- + "llm_ranker\030\003 \001(\0132E.google.cloud.aiplatform.v1beta1.RagRe"
- + "trievalConfig.Ranking.LlmRankerB\003\340A\001H\000\032:\n"
+ + "\014rank_service\030\001 \001(\0132G.google."
+ + "cloud.aiplatform.v1beta1.RagRetrievalConfig.Ranking.RankServiceB\003\340A\001H\000\022`\n\n"
+ + "llm_ranker\030\003 \001(\0132E.google.cloud.aiplatform.v1b"
+ + "eta1.RagRetrievalConfig.Ranking.LlmRankerB\003\340A\001H\000\032:\n"
+ "\013RankService\022\034\n\n"
+ "model_name\030\001 \001(\tB\003\340A\001H\000\210\001\001B\r\n"
+ "\013_model_name\0328\n"
@@ -423,11 +433,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "model_name\030\001 \001(\tB\003\340A\001H\000\210\001\001B\r\n"
+ "\013_model_nameB\020\n"
+ "\016ranking_configB\340\001\n"
- + "#com.google.cloud.aiplatform.v1beta1B\tToolProtoP\001ZCcloud.googl"
- + "e.com/go/aiplatform/apiv1beta1/aiplatfor"
- + "mpb;aiplatformpb\252\002\037Google.Cloud.AIPlatfo"
- + "rm.V1Beta1\312\002\037Google\\Cloud\\AIPlatform\\V1b"
- + "eta1\352\002\"Google::Cloud::AIPlatform::V1beta1b\006proto3"
+ + "#com.google.cloud.aiplatform.v1beta1B\tToolProtoP\001ZCc"
+ + "loud.google.com/go/aiplatform/apiv1beta1"
+ + "/aiplatformpb;aiplatformpb\252\002\037Google.Clou"
+ + "d.AIPlatform.V1Beta1\312\002\037Google\\Cloud\\AIPl"
+ + "atform\\V1beta1\352\002\"Google::Cloud::AIPlatform::V1beta1b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -452,6 +462,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"GoogleMaps",
"EnterpriseWebSearch",
"ParallelAiSearch",
+ "ExaAiSearch",
"CodeExecution",
"UrlContext",
"ComputerUse",
@@ -472,14 +483,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new java.lang.String[] {
"ApiKey", "CustomConfigs",
});
- internal_static_google_cloud_aiplatform_v1beta1_Tool_CodeExecution_descriptor =
+ internal_static_google_cloud_aiplatform_v1beta1_Tool_ExaAiSearch_descriptor =
internal_static_google_cloud_aiplatform_v1beta1_Tool_descriptor.getNestedType(2);
+ internal_static_google_cloud_aiplatform_v1beta1_Tool_ExaAiSearch_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_google_cloud_aiplatform_v1beta1_Tool_ExaAiSearch_descriptor,
+ new java.lang.String[] {
+ "ApiKey", "CustomConfigs",
+ });
+ internal_static_google_cloud_aiplatform_v1beta1_Tool_CodeExecution_descriptor =
+ internal_static_google_cloud_aiplatform_v1beta1_Tool_descriptor.getNestedType(3);
internal_static_google_cloud_aiplatform_v1beta1_Tool_CodeExecution_fieldAccessorTable =
new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_google_cloud_aiplatform_v1beta1_Tool_CodeExecution_descriptor,
new java.lang.String[] {});
internal_static_google_cloud_aiplatform_v1beta1_Tool_ComputerUse_descriptor =
- internal_static_google_cloud_aiplatform_v1beta1_Tool_descriptor.getNestedType(3);
+ internal_static_google_cloud_aiplatform_v1beta1_Tool_descriptor.getNestedType(4);
internal_static_google_cloud_aiplatform_v1beta1_Tool_ComputerUse_fieldAccessorTable =
new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_google_cloud_aiplatform_v1beta1_Tool_ComputerUse_descriptor,
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagStore.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagStore.java
index 0029590525f6..3f779d496f9c 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagStore.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/VertexRagStore.java
@@ -1102,7 +1102,7 @@ public com.google.protobuf.ParserSearchMessages
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): @@ -295,9 +320,11 @@ *
SearchSpaces
Returns a list of spaces in a Google Workspace organization based on an administrator's search. In the request, set `use_admin_access` to `true`. For an example, see [Search for and manage spaces](https://developers.google.com/workspace/chat/search-manage-admin). - *
Requires [user authentication with administrator privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges) and one of the following [authorization scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - *
- `https://www.googleapis.com/auth/chat.admin.spaces.readonly` - `https://www.googleapis.com/auth/chat.admin.spaces`
Returns a list of spaces in a Google Workspace organization. For an example, see [Search for and manage spaces](https://developers.google.com/workspace/chat/search-manage-admin). + *
When `use_admin_access` is set to `false`, the results are limited to spaces where the calling user is a joined member. To search with administrator privileges, set `use_admin_access` to `true`. + *
Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): + *
- [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) with one of the following authorization scopes: - `https://www.googleapis.com/auth/chat.spaces.readonly` - `https://www.googleapis.com/auth/chat.spaces` + *
- [User authentication with administrator privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges) and one of the following [authorization scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - `https://www.googleapis.com/auth/chat.admin.spaces.readonly` - `https://www.googleapis.com/auth/chat.admin.spaces`
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*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: + * + *
{@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.
+ * 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: + * + *
{@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.
+ * 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: + * + *
{@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.
+ *
+ * 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: + * + *
{@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 future =
+ * chatServiceClient.searchMessagesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (SearchMessageResult element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableTo 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: + * + *
{@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 UnaryCallableWhen `use_admin_access` is set to `false`, the results are limited to spaces where the + * calling user is a joined member. To search with administrator privileges, set + * `use_admin_access` to `true`. + * + *
Supports the following types of + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): + * + *
- [User + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following authorization scopes: - + * `https://www.googleapis.com/auth/chat.spaces.readonly` - + * `https://www.googleapis.com/auth/chat.spaces` * - *
Requires [user authentication with administrator + *
- [User authentication with administrator * privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges) * and one of the following [authorization - * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - * - *
- `https://www.googleapis.com/auth/chat.admin.spaces.readonly` - + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - + * `https://www.googleapis.com/auth/chat.admin.spaces.readonly` - * `https://www.googleapis.com/auth/chat.admin.spaces` * *
Sample code: @@ -3342,16 +3824,27 @@ public final SearchSpacesPagedResponse searchSpaces() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns a list of spaces in a Google Workspace organization based on an administrator's search. - * In the request, set `use_admin_access` to `true`. For an example, see [Search for and manage - * spaces](https://developers.google.com/workspace/chat/search-manage-admin). + * Returns a list of spaces in a Google Workspace organization. For an example, see [Search for + * and manage spaces](https://developers.google.com/workspace/chat/search-manage-admin). + * + *
When `use_admin_access` is set to `false`, the results are limited to spaces where the + * calling user is a joined member. To search with administrator privileges, set + * `use_admin_access` to `true`. * - *
Requires [user authentication with administrator + *
Supports the following types of + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): + * + *
- [User + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following authorization scopes: - + * `https://www.googleapis.com/auth/chat.spaces.readonly` - + * `https://www.googleapis.com/auth/chat.spaces` + * + *
- [User authentication with administrator * privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges) * and one of the following [authorization - * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - * - *
- `https://www.googleapis.com/auth/chat.admin.spaces.readonly` - + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - + * `https://www.googleapis.com/auth/chat.admin.spaces.readonly` - * `https://www.googleapis.com/auth/chat.admin.spaces` * *
Sample code: @@ -3386,16 +3879,27 @@ public final SearchSpacesPagedResponse searchSpaces(SearchSpacesRequest request) // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns a list of spaces in a Google Workspace organization based on an administrator's search. - * In the request, set `use_admin_access` to `true`. For an example, see [Search for and manage - * spaces](https://developers.google.com/workspace/chat/search-manage-admin). + * Returns a list of spaces in a Google Workspace organization. For an example, see [Search for + * and manage spaces](https://developers.google.com/workspace/chat/search-manage-admin). * - *
Requires [user authentication with administrator + *
When `use_admin_access` is set to `false`, the results are limited to spaces where the + * calling user is a joined member. To search with administrator privileges, set + * `use_admin_access` to `true`. + * + *
Supports the following types of + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): + * + *
- [User + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following authorization scopes: - + * `https://www.googleapis.com/auth/chat.spaces.readonly` - + * `https://www.googleapis.com/auth/chat.spaces` + * + *
- [User authentication with administrator * privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges) * and one of the following [authorization - * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - * - *
- `https://www.googleapis.com/auth/chat.admin.spaces.readonly` - + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - + * `https://www.googleapis.com/auth/chat.admin.spaces.readonly` - * `https://www.googleapis.com/auth/chat.admin.spaces` * *
Sample code: @@ -3430,16 +3934,27 @@ public final SearchSpacesPagedResponse searchSpaces(SearchSpacesRequest request) // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Returns a list of spaces in a Google Workspace organization based on an administrator's search. - * In the request, set `use_admin_access` to `true`. For an example, see [Search for and manage - * spaces](https://developers.google.com/workspace/chat/search-manage-admin). + * Returns a list of spaces in a Google Workspace organization. For an example, see [Search for + * and manage spaces](https://developers.google.com/workspace/chat/search-manage-admin). + * + *
When `use_admin_access` is set to `false`, the results are limited to spaces where the + * calling user is a joined member. To search with administrator privileges, set + * `use_admin_access` to `true`. + * + *
Supports the following types of + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): + * + *
- [User + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following authorization scopes: - + * `https://www.googleapis.com/auth/chat.spaces.readonly` - + * `https://www.googleapis.com/auth/chat.spaces` * - *
Requires [user authentication with administrator + *
- [User authentication with administrator * privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges) * and one of the following [authorization - * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - * - *
- `https://www.googleapis.com/auth/chat.admin.spaces.readonly` - + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - + * `https://www.googleapis.com/auth/chat.admin.spaces.readonly` - * `https://www.googleapis.com/auth/chat.admin.spaces` * *
Sample code:
@@ -10045,6 +10560,86 @@ protected ListMembershipsFixedSizeCollection createCollection(
}
}
+ public static class SearchMessagesPagedResponse
+ extends AbstractPagedListResponse<
+ SearchMessagesRequest,
+ SearchMessagesResponse,
+ SearchMessageResult,
+ SearchMessagesPage,
+ SearchMessagesFixedSizeCollection> {
+
+ public static ApiFuture 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
+ * 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
- * Returns a list of spaces in a Google Workspace organization based on an
- * administrator's search. In the request, set `use_admin_access` to `true`.
- * For an example, see [Search for and manage
+ * Returns a list of spaces in a Google Workspace organization. For an
+ * example, see [Search for and manage
* spaces](https://developers.google.com/workspace/chat/search-manage-admin).
- * Requires [user
+ * When `use_admin_access` is set to `false`, the results are limited to
+ * spaces where the calling user is a joined member. To search with
+ * administrator privileges, set `use_admin_access` to `true`.
+ * Supports the following types of
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
+ * - [User
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+ * with one of the following authorization scopes:
+ * - `https://www.googleapis.com/auth/chat.spaces.readonly`
+ * - `https://www.googleapis.com/auth/chat.spaces`
+ * - [User
* authentication with administrator
* privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges)
* and one of the following [authorization
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
- * - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
- * - `https://www.googleapis.com/auth/chat.admin.spaces`
+ * - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
+ * - `https://www.googleapis.com/auth/chat.admin.spaces`
*
*/
default void searchSpaces(
@@ -3836,6 +3922,43 @@ public void deleteMessage(
responseObserver);
}
+ /**
+ *
+ *
+ *
+ * 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
- * Returns a list of spaces in a Google Workspace organization based on an
- * administrator's search. In the request, set `use_admin_access` to `true`.
- * For an example, see [Search for and manage
+ * Returns a list of spaces in a Google Workspace organization. For an
+ * example, see [Search for and manage
* spaces](https://developers.google.com/workspace/chat/search-manage-admin).
- * Requires [user
+ * When `use_admin_access` is set to `false`, the results are limited to
+ * spaces where the calling user is a joined member. To search with
+ * administrator privileges, set `use_admin_access` to `true`.
+ * Supports the following types of
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
+ * - [User
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+ * with one of the following authorization scopes:
+ * - `https://www.googleapis.com/auth/chat.spaces.readonly`
+ * - `https://www.googleapis.com/auth/chat.spaces`
+ * - [User
* authentication with administrator
* privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges)
* and one of the following [authorization
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
- * - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
- * - `https://www.googleapis.com/auth/chat.admin.spaces`
+ * - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
+ * - `https://www.googleapis.com/auth/chat.admin.spaces`
*
*/
public void searchSpaces(
@@ -5390,6 +5522,40 @@ public com.google.protobuf.Empty deleteMessage(com.google.chat.v1.DeleteMessageR
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) throws io.grpc.StatusException {
+ return io.grpc.stub.ClientCalls.blockingV2UnaryCall(
+ getChannel(), getSearchMessagesMethod(), getCallOptions(), request);
+ }
+
/**
*
*
@@ -5472,17 +5638,26 @@ public com.google.chat.v1.ListSpacesResponse listSpaces(
*
*
*
- * Returns a list of spaces in a Google Workspace organization based on an
- * administrator's search. In the request, set `use_admin_access` to `true`.
- * For an example, see [Search for and manage
+ * Returns a list of spaces in a Google Workspace organization. For an
+ * example, see [Search for and manage
* spaces](https://developers.google.com/workspace/chat/search-manage-admin).
- * Requires [user
+ * When `use_admin_access` is set to `false`, the results are limited to
+ * spaces where the calling user is a joined member. To search with
+ * administrator privileges, set `use_admin_access` to `true`.
+ * Supports the following types of
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
+ * - [User
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+ * with one of the following authorization scopes:
+ * - `https://www.googleapis.com/auth/chat.spaces.readonly`
+ * - `https://www.googleapis.com/auth/chat.spaces`
+ * - [User
* authentication with administrator
* privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges)
* and one of the following [authorization
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
- * - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
- * - `https://www.googleapis.com/auth/chat.admin.spaces`
+ * - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
+ * - `https://www.googleapis.com/auth/chat.admin.spaces`
*
*/
public com.google.chat.v1.SearchSpacesResponse searchSpaces(
@@ -6829,6 +7004,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);
+ }
+
/**
*
*
@@ -6911,17 +7120,26 @@ public com.google.chat.v1.ListSpacesResponse listSpaces(
*
*
*
- * Returns a list of spaces in a Google Workspace organization based on an
- * administrator's search. In the request, set `use_admin_access` to `true`.
- * For an example, see [Search for and manage
+ * Returns a list of spaces in a Google Workspace organization. For an
+ * example, see [Search for and manage
* spaces](https://developers.google.com/workspace/chat/search-manage-admin).
- * Requires [user
+ * When `use_admin_access` is set to `false`, the results are limited to
+ * spaces where the calling user is a joined member. To search with
+ * administrator privileges, set `use_admin_access` to `true`.
+ * Supports the following types of
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
+ * - [User
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+ * with one of the following authorization scopes:
+ * - `https://www.googleapis.com/auth/chat.spaces.readonly`
+ * - `https://www.googleapis.com/auth/chat.spaces`
+ * - [User
* authentication with administrator
* privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges)
* and one of the following [authorization
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
- * - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
- * - `https://www.googleapis.com/auth/chat.admin.spaces`
+ * - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
+ * - `https://www.googleapis.com/auth/chat.admin.spaces`
*
*/
public com.google.chat.v1.SearchSpacesResponse searchSpaces(
@@ -8264,6 +8482,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);
+ }
+
/**
*
*
@@ -8347,17 +8600,26 @@ protected ChatServiceFutureStub build(
*
*
*
- * Returns a list of spaces in a Google Workspace organization based on an
- * administrator's search. In the request, set `use_admin_access` to `true`.
- * For an example, see [Search for and manage
+ * Returns a list of spaces in a Google Workspace organization. For an
+ * example, see [Search for and manage
* spaces](https://developers.google.com/workspace/chat/search-manage-admin).
- * Requires [user
+ * When `use_admin_access` is set to `false`, the results are limited to
+ * spaces where the calling user is a joined member. To search with
+ * administrator privileges, set `use_admin_access` to `true`.
+ * Supports the following types of
+ * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
+ * - [User
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+ * with one of the following authorization scopes:
+ * - `https://www.googleapis.com/auth/chat.spaces.readonly`
+ * - `https://www.googleapis.com/auth/chat.spaces`
+ * - [User
* authentication with administrator
* privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges)
* and one of the following [authorization
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
- * - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
- * - `https://www.googleapis.com/auth/chat.admin.spaces`
+ * - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
+ * - `https://www.googleapis.com/auth/chat.admin.spaces`
*
*/
public com.google.common.util.concurrent.ListenableFuture<
@@ -9447,47 +9709,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/SearchSpacesRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesRequest.java
index b662eeb4deba..f54934d5760d 100644
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesRequest.java
+++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesRequest.java
@@ -89,9 +89,6 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
* Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
* [OAuth 2.0
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
- *
- * This method currently only supports admin access, thus only `true` is
- * accepted for this field.
* bool use_admin_access = 1;
@@ -202,7 +199,8 @@ public com.google.protobuf.ByteString getPageTokenBytes() {
*
* Required. A search query.
*
- * You can search by using the following parameters:
+ * You can search by using the following parameters when `useAdminAccess`
+ * is set to `true`:
*
* - `create_time`
* - `customer`
@@ -212,18 +210,27 @@ public com.google.protobuf.ByteString getPageTokenBytes() {
* - `space_history_state`
* - `space_type`
*
+ * When `useAdminAccess` is set to `false`:
+ *
+ * - `display_name`
+ * - `external_user_allowed`
+ * - `space_type`
+ *
* `create_time` and `last_active_time` accept a timestamp in
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
* comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
*
- * `customer` is required and is used to indicate which customer
- * to fetch spaces from. `customers/my_customer` is the only supported value.
+ * `customer` is required when `useAdminAccess` is set to `true`, and is
+ * used to indicate which customer to fetch spaces from.
+ * `customers/my_customer` is the only supported value.
*
* `display_name` only accepts the `HAS` (`:`) operator. The text to
* match is first tokenized into tokens and each token is prefix-matched
* case-insensitively and independently as a substring anywhere in the space's
* `display_name`. For example, `Fun Eve` matches `Fun event` or `The
- * evening was fun`, but not `notFun event` or `even`.
+ * evening was fun`, but not `notFun event` or `even`. When `useAdminAccess`
+ * is set to `false`, `display_name` is required to retrieve meaningful
+ * results. Otherwise, the default behavior is to return an empty response.
*
* `external_user_allowed` accepts either `true` or `false`.
*
@@ -246,7 +253,8 @@ public com.google.protobuf.ByteString getPageTokenBytes() {
* < "2022-01-01T00:00:00+00:00" AND last_active_time >
* "2023-01-01T00:00:00+00:00"`.
*
- * The following example queries are valid:
+ * The following example queries are valid when `useAdminAccess` is set to
+ * `true`:
*
* ```
* customer = "customers/my_customer" AND space_type = "SPACE"
@@ -268,6 +276,21 @@ public com.google.protobuf.ByteString getPageTokenBytes() {
* "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
* (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
* ```
+ *
+ * The following example queries are valid when `useAdminAccess` is set to
+ * `false`:
+ *
+ * ```
+ * display_name:"Hello World" AND space_type = "SPACE"
+ *
+ * (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
+ *
+ * (external_user_allowed = "true" AND space_type = "SPACE") // Returns an
+ * empty response.
+ *
+ * (external_user_allowed = "true" AND display_name:"Hello" AND space_type =
+ * "SPACE")
+ * ```
*
*
* string query = 4 [(.google.api.field_behavior) = REQUIRED];
@@ -293,7 +316,8 @@ public java.lang.String getQuery() {
*
* Required. A search query.
*
- * You can search by using the following parameters:
+ * You can search by using the following parameters when `useAdminAccess`
+ * is set to `true`:
*
* - `create_time`
* - `customer`
@@ -303,18 +327,27 @@ public java.lang.String getQuery() {
* - `space_history_state`
* - `space_type`
*
+ * When `useAdminAccess` is set to `false`:
+ *
+ * - `display_name`
+ * - `external_user_allowed`
+ * - `space_type`
+ *
* `create_time` and `last_active_time` accept a timestamp in
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
* comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
*
- * `customer` is required and is used to indicate which customer
- * to fetch spaces from. `customers/my_customer` is the only supported value.
+ * `customer` is required when `useAdminAccess` is set to `true`, and is
+ * used to indicate which customer to fetch spaces from.
+ * `customers/my_customer` is the only supported value.
*
* `display_name` only accepts the `HAS` (`:`) operator. The text to
* match is first tokenized into tokens and each token is prefix-matched
* case-insensitively and independently as a substring anywhere in the space's
* `display_name`. For example, `Fun Eve` matches `Fun event` or `The
- * evening was fun`, but not `notFun event` or `even`.
+ * evening was fun`, but not `notFun event` or `even`. When `useAdminAccess`
+ * is set to `false`, `display_name` is required to retrieve meaningful
+ * results. Otherwise, the default behavior is to return an empty response.
*
* `external_user_allowed` accepts either `true` or `false`.
*
@@ -337,7 +370,8 @@ public java.lang.String getQuery() {
* < "2022-01-01T00:00:00+00:00" AND last_active_time >
* "2023-01-01T00:00:00+00:00"`.
*
- * The following example queries are valid:
+ * The following example queries are valid when `useAdminAccess` is set to
+ * `true`:
*
* ```
* customer = "customers/my_customer" AND space_type = "SPACE"
@@ -359,6 +393,21 @@ public java.lang.String getQuery() {
* "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
* (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
* ```
+ *
+ * The following example queries are valid when `useAdminAccess` is set to
+ * `false`:
+ *
+ * ```
+ * display_name:"Hello World" AND space_type = "SPACE"
+ *
+ * (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
+ *
+ * (external_user_allowed = "true" AND space_type = "SPACE") // Returns an
+ * empty response.
+ *
+ * (external_user_allowed = "true" AND display_name:"Hello" AND space_type =
+ * "SPACE")
+ * ```
*
*
* string query = 4 [(.google.api.field_behavior) = REQUIRED];
@@ -397,13 +446,17 @@ public com.google.protobuf.ByteString getQueryBytes() {
* any topic of this space.
* - `create_time` — Denotes the time of the space creation.
*
+ * When `useAdminAccess` is `false`, only `create_time` and `relevance` are
+ * supported for ordering. Only `DESC` is supported for these fields in
+ * non-admin searches.
+ *
* Valid ordering operation values are:
*
* - `ASC` for ascending. Default value.
*
* - `DESC` for descending.
*
- * The supported syntax are:
+ * The supported syntax are when `useAdminAccess` is set to `true`:
*
* - `membership_count.joined_direct_human_user_count DESC`
* - `membership_count.joined_direct_human_user_count ASC`
@@ -411,6 +464,11 @@ public com.google.protobuf.ByteString getQueryBytes() {
* - `last_active_time ASC`
* - `create_time DESC`
* - `create_time ASC`
+ *
+ * When `useAdminAccess` is set to `false`:
+ *
+ * - `create_time DESC`
+ * - `relevance DESC`
* string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
@@ -444,13 +502,17 @@ public java.lang.String getOrderBy() {
* any topic of this space.
* - `create_time` — Denotes the time of the space creation.
*
+ * When `useAdminAccess` is `false`, only `create_time` and `relevance` are
+ * supported for ordering. Only `DESC` is supported for these fields in
+ * non-admin searches.
+ *
* Valid ordering operation values are:
*
* - `ASC` for ascending. Default value.
*
* - `DESC` for descending.
*
- * The supported syntax are:
+ * The supported syntax are when `useAdminAccess` is set to `true`:
*
* - `membership_count.joined_direct_human_user_count DESC`
* - `membership_count.joined_direct_human_user_count ASC`
@@ -458,6 +520,11 @@ public java.lang.String getOrderBy() {
* - `last_active_time ASC`
* - `create_time DESC`
* - `create_time ASC`
+ *
+ * When `useAdminAccess` is set to `false`:
+ *
+ * - `create_time DESC`
+ * - `relevance DESC`
*
*
* string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
@@ -893,9 +960,6 @@ public Builder mergeFrom(
* Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
* [OAuth 2.0
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
- *
- * This method currently only supports admin access, thus only `true` is
- * accepted for this field.
*
*
* bool use_admin_access = 1;
@@ -921,9 +985,6 @@ public boolean getUseAdminAccess() {
* Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
* [OAuth 2.0
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
- *
- * This method currently only supports admin access, thus only `true` is
- * accepted for this field.
*
*
* bool use_admin_access = 1;
@@ -953,9 +1014,6 @@ public Builder setUseAdminAccess(boolean value) {
* Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
* [OAuth 2.0
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
- *
- * This method currently only supports admin access, thus only `true` is
- * accepted for this field.
*
*
* bool use_admin_access = 1;
@@ -1187,7 +1245,8 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) {
*
* Required. A search query.
*
- * You can search by using the following parameters:
+ * You can search by using the following parameters when `useAdminAccess`
+ * is set to `true`:
*
* - `create_time`
* - `customer`
@@ -1197,18 +1256,27 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) {
* - `space_history_state`
* - `space_type`
*
+ * When `useAdminAccess` is set to `false`:
+ *
+ * - `display_name`
+ * - `external_user_allowed`
+ * - `space_type`
+ *
* `create_time` and `last_active_time` accept a timestamp in
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
* comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
*
- * `customer` is required and is used to indicate which customer
- * to fetch spaces from. `customers/my_customer` is the only supported value.
+ * `customer` is required when `useAdminAccess` is set to `true`, and is
+ * used to indicate which customer to fetch spaces from.
+ * `customers/my_customer` is the only supported value.
*
* `display_name` only accepts the `HAS` (`:`) operator. The text to
* match is first tokenized into tokens and each token is prefix-matched
* case-insensitively and independently as a substring anywhere in the space's
* `display_name`. For example, `Fun Eve` matches `Fun event` or `The
- * evening was fun`, but not `notFun event` or `even`.
+ * evening was fun`, but not `notFun event` or `even`. When `useAdminAccess`
+ * is set to `false`, `display_name` is required to retrieve meaningful
+ * results. Otherwise, the default behavior is to return an empty response.
*
* `external_user_allowed` accepts either `true` or `false`.
*
@@ -1231,7 +1299,8 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) {
* < "2022-01-01T00:00:00+00:00" AND last_active_time >
* "2023-01-01T00:00:00+00:00"`.
*
- * The following example queries are valid:
+ * The following example queries are valid when `useAdminAccess` is set to
+ * `true`:
*
* ```
* customer = "customers/my_customer" AND space_type = "SPACE"
@@ -1253,6 +1322,21 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) {
* "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
* (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
* ```
+ *
+ * The following example queries are valid when `useAdminAccess` is set to
+ * `false`:
+ *
+ * ```
+ * display_name:"Hello World" AND space_type = "SPACE"
+ *
+ * (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
+ *
+ * (external_user_allowed = "true" AND space_type = "SPACE") // Returns an
+ * empty response.
+ *
+ * (external_user_allowed = "true" AND display_name:"Hello" AND space_type =
+ * "SPACE")
+ * ```
*
*
* string query = 4 [(.google.api.field_behavior) = REQUIRED];
@@ -1277,7 +1361,8 @@ public java.lang.String getQuery() {
*
* Required. A search query.
*
- * You can search by using the following parameters:
+ * You can search by using the following parameters when `useAdminAccess`
+ * is set to `true`:
*
* - `create_time`
* - `customer`
@@ -1287,18 +1372,27 @@ public java.lang.String getQuery() {
* - `space_history_state`
* - `space_type`
*
+ * When `useAdminAccess` is set to `false`:
+ *
+ * - `display_name`
+ * - `external_user_allowed`
+ * - `space_type`
+ *
* `create_time` and `last_active_time` accept a timestamp in
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
* comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
*
- * `customer` is required and is used to indicate which customer
- * to fetch spaces from. `customers/my_customer` is the only supported value.
+ * `customer` is required when `useAdminAccess` is set to `true`, and is
+ * used to indicate which customer to fetch spaces from.
+ * `customers/my_customer` is the only supported value.
*
* `display_name` only accepts the `HAS` (`:`) operator. The text to
* match is first tokenized into tokens and each token is prefix-matched
* case-insensitively and independently as a substring anywhere in the space's
* `display_name`. For example, `Fun Eve` matches `Fun event` or `The
- * evening was fun`, but not `notFun event` or `even`.
+ * evening was fun`, but not `notFun event` or `even`. When `useAdminAccess`
+ * is set to `false`, `display_name` is required to retrieve meaningful
+ * results. Otherwise, the default behavior is to return an empty response.
*
* `external_user_allowed` accepts either `true` or `false`.
*
@@ -1321,7 +1415,8 @@ public java.lang.String getQuery() {
* < "2022-01-01T00:00:00+00:00" AND last_active_time >
* "2023-01-01T00:00:00+00:00"`.
*
- * The following example queries are valid:
+ * The following example queries are valid when `useAdminAccess` is set to
+ * `true`:
*
* ```
* customer = "customers/my_customer" AND space_type = "SPACE"
@@ -1343,6 +1438,21 @@ public java.lang.String getQuery() {
* "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
* (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
* ```
+ *
+ * The following example queries are valid when `useAdminAccess` is set to
+ * `false`:
+ *
+ * ```
+ * display_name:"Hello World" AND space_type = "SPACE"
+ *
+ * (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
+ *
+ * (external_user_allowed = "true" AND space_type = "SPACE") // Returns an
+ * empty response.
+ *
+ * (external_user_allowed = "true" AND display_name:"Hello" AND space_type =
+ * "SPACE")
+ * ```
*
*
* string query = 4 [(.google.api.field_behavior) = REQUIRED];
@@ -1367,7 +1477,8 @@ public com.google.protobuf.ByteString getQueryBytes() {
*
* Required. A search query.
*
- * You can search by using the following parameters:
+ * You can search by using the following parameters when `useAdminAccess`
+ * is set to `true`:
*
* - `create_time`
* - `customer`
@@ -1377,18 +1488,27 @@ public com.google.protobuf.ByteString getQueryBytes() {
* - `space_history_state`
* - `space_type`
*
+ * When `useAdminAccess` is set to `false`:
+ *
+ * - `display_name`
+ * - `external_user_allowed`
+ * - `space_type`
+ *
* `create_time` and `last_active_time` accept a timestamp in
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
* comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
*
- * `customer` is required and is used to indicate which customer
- * to fetch spaces from. `customers/my_customer` is the only supported value.
+ * `customer` is required when `useAdminAccess` is set to `true`, and is
+ * used to indicate which customer to fetch spaces from.
+ * `customers/my_customer` is the only supported value.
*
* `display_name` only accepts the `HAS` (`:`) operator. The text to
* match is first tokenized into tokens and each token is prefix-matched
* case-insensitively and independently as a substring anywhere in the space's
* `display_name`. For example, `Fun Eve` matches `Fun event` or `The
- * evening was fun`, but not `notFun event` or `even`.
+ * evening was fun`, but not `notFun event` or `even`. When `useAdminAccess`
+ * is set to `false`, `display_name` is required to retrieve meaningful
+ * results. Otherwise, the default behavior is to return an empty response.
*
* `external_user_allowed` accepts either `true` or `false`.
*
@@ -1411,7 +1531,8 @@ public com.google.protobuf.ByteString getQueryBytes() {
* < "2022-01-01T00:00:00+00:00" AND last_active_time >
* "2023-01-01T00:00:00+00:00"`.
*
- * The following example queries are valid:
+ * The following example queries are valid when `useAdminAccess` is set to
+ * `true`:
*
* ```
* customer = "customers/my_customer" AND space_type = "SPACE"
@@ -1433,6 +1554,21 @@ public com.google.protobuf.ByteString getQueryBytes() {
* "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
* (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
* ```
+ *
+ * The following example queries are valid when `useAdminAccess` is set to
+ * `false`:
+ *
+ * ```
+ * display_name:"Hello World" AND space_type = "SPACE"
+ *
+ * (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
+ *
+ * (external_user_allowed = "true" AND space_type = "SPACE") // Returns an
+ * empty response.
+ *
+ * (external_user_allowed = "true" AND display_name:"Hello" AND space_type =
+ * "SPACE")
+ * ```
*
*
* string query = 4 [(.google.api.field_behavior) = REQUIRED];
@@ -1456,7 +1592,8 @@ public Builder setQuery(java.lang.String value) {
*
* Required. A search query.
*
- * You can search by using the following parameters:
+ * You can search by using the following parameters when `useAdminAccess`
+ * is set to `true`:
*
* - `create_time`
* - `customer`
@@ -1466,18 +1603,27 @@ public Builder setQuery(java.lang.String value) {
* - `space_history_state`
* - `space_type`
*
+ * When `useAdminAccess` is set to `false`:
+ *
+ * - `display_name`
+ * - `external_user_allowed`
+ * - `space_type`
+ *
* `create_time` and `last_active_time` accept a timestamp in
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
* comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
*
- * `customer` is required and is used to indicate which customer
- * to fetch spaces from. `customers/my_customer` is the only supported value.
+ * `customer` is required when `useAdminAccess` is set to `true`, and is
+ * used to indicate which customer to fetch spaces from.
+ * `customers/my_customer` is the only supported value.
*
* `display_name` only accepts the `HAS` (`:`) operator. The text to
* match is first tokenized into tokens and each token is prefix-matched
* case-insensitively and independently as a substring anywhere in the space's
* `display_name`. For example, `Fun Eve` matches `Fun event` or `The
- * evening was fun`, but not `notFun event` or `even`.
+ * evening was fun`, but not `notFun event` or `even`. When `useAdminAccess`
+ * is set to `false`, `display_name` is required to retrieve meaningful
+ * results. Otherwise, the default behavior is to return an empty response.
*
* `external_user_allowed` accepts either `true` or `false`.
*
@@ -1500,7 +1646,8 @@ public Builder setQuery(java.lang.String value) {
* < "2022-01-01T00:00:00+00:00" AND last_active_time >
* "2023-01-01T00:00:00+00:00"`.
*
- * The following example queries are valid:
+ * The following example queries are valid when `useAdminAccess` is set to
+ * `true`:
*
* ```
* customer = "customers/my_customer" AND space_type = "SPACE"
@@ -1522,6 +1669,21 @@ public Builder setQuery(java.lang.String value) {
* "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
* (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
* ```
+ *
+ * The following example queries are valid when `useAdminAccess` is set to
+ * `false`:
+ *
+ * ```
+ * display_name:"Hello World" AND space_type = "SPACE"
+ *
+ * (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
+ *
+ * (external_user_allowed = "true" AND space_type = "SPACE") // Returns an
+ * empty response.
+ *
+ * (external_user_allowed = "true" AND display_name:"Hello" AND space_type =
+ * "SPACE")
+ * ```
*
*
* string query = 4 [(.google.api.field_behavior) = REQUIRED];
@@ -1541,7 +1703,8 @@ public Builder clearQuery() {
*
* Required. A search query.
*
- * You can search by using the following parameters:
+ * You can search by using the following parameters when `useAdminAccess`
+ * is set to `true`:
*
* - `create_time`
* - `customer`
@@ -1551,18 +1714,27 @@ public Builder clearQuery() {
* - `space_history_state`
* - `space_type`
*
+ * When `useAdminAccess` is set to `false`:
+ *
+ * - `display_name`
+ * - `external_user_allowed`
+ * - `space_type`
+ *
* `create_time` and `last_active_time` accept a timestamp in
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
* comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
*
- * `customer` is required and is used to indicate which customer
- * to fetch spaces from. `customers/my_customer` is the only supported value.
+ * `customer` is required when `useAdminAccess` is set to `true`, and is
+ * used to indicate which customer to fetch spaces from.
+ * `customers/my_customer` is the only supported value.
*
* `display_name` only accepts the `HAS` (`:`) operator. The text to
* match is first tokenized into tokens and each token is prefix-matched
* case-insensitively and independently as a substring anywhere in the space's
* `display_name`. For example, `Fun Eve` matches `Fun event` or `The
- * evening was fun`, but not `notFun event` or `even`.
+ * evening was fun`, but not `notFun event` or `even`. When `useAdminAccess`
+ * is set to `false`, `display_name` is required to retrieve meaningful
+ * results. Otherwise, the default behavior is to return an empty response.
*
* `external_user_allowed` accepts either `true` or `false`.
*
@@ -1585,7 +1757,8 @@ public Builder clearQuery() {
* < "2022-01-01T00:00:00+00:00" AND last_active_time >
* "2023-01-01T00:00:00+00:00"`.
*
- * The following example queries are valid:
+ * The following example queries are valid when `useAdminAccess` is set to
+ * `true`:
*
* ```
* customer = "customers/my_customer" AND space_type = "SPACE"
@@ -1607,6 +1780,21 @@ public Builder clearQuery() {
* "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
* (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
* ```
+ *
+ * The following example queries are valid when `useAdminAccess` is set to
+ * `false`:
+ *
+ * ```
+ * display_name:"Hello World" AND space_type = "SPACE"
+ *
+ * (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
+ *
+ * (external_user_allowed = "true" AND space_type = "SPACE") // Returns an
+ * empty response.
+ *
+ * (external_user_allowed = "true" AND display_name:"Hello" AND space_type =
+ * "SPACE")
+ * ```
*
*
* string query = 4 [(.google.api.field_behavior) = REQUIRED];
@@ -1641,13 +1829,17 @@ public Builder setQueryBytes(com.google.protobuf.ByteString value) {
* any topic of this space.
* - `create_time` — Denotes the time of the space creation.
*
+ * When `useAdminAccess` is `false`, only `create_time` and `relevance` are
+ * supported for ordering. Only `DESC` is supported for these fields in
+ * non-admin searches.
+ *
* Valid ordering operation values are:
*
* - `ASC` for ascending. Default value.
*
* - `DESC` for descending.
*
- * The supported syntax are:
+ * The supported syntax are when `useAdminAccess` is set to `true`:
*
* - `membership_count.joined_direct_human_user_count DESC`
* - `membership_count.joined_direct_human_user_count ASC`
@@ -1655,6 +1847,11 @@ public Builder setQueryBytes(com.google.protobuf.ByteString value) {
* - `last_active_time ASC`
* - `create_time DESC`
* - `create_time ASC`
+ *
+ * When `useAdminAccess` is set to `false`:
+ *
+ * - `create_time DESC`
+ * - `relevance DESC`
*
*
* string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
@@ -1687,13 +1884,17 @@ public java.lang.String getOrderBy() {
* any topic of this space.
* - `create_time` — Denotes the time of the space creation.
*
+ * When `useAdminAccess` is `false`, only `create_time` and `relevance` are
+ * supported for ordering. Only `DESC` is supported for these fields in
+ * non-admin searches.
+ *
* Valid ordering operation values are:
*
* - `ASC` for ascending. Default value.
*
* - `DESC` for descending.
*
- * The supported syntax are:
+ * The supported syntax are when `useAdminAccess` is set to `true`:
*
* - `membership_count.joined_direct_human_user_count DESC`
* - `membership_count.joined_direct_human_user_count ASC`
@@ -1701,6 +1902,11 @@ public java.lang.String getOrderBy() {
* - `last_active_time ASC`
* - `create_time DESC`
* - `create_time ASC`
+ *
+ * When `useAdminAccess` is set to `false`:
+ *
+ * - `create_time DESC`
+ * - `relevance DESC`
*
*
* string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
@@ -1733,13 +1939,17 @@ public com.google.protobuf.ByteString getOrderByBytes() {
* any topic of this space.
* - `create_time` — Denotes the time of the space creation.
*
+ * When `useAdminAccess` is `false`, only `create_time` and `relevance` are
+ * supported for ordering. Only `DESC` is supported for these fields in
+ * non-admin searches.
+ *
* Valid ordering operation values are:
*
* - `ASC` for ascending. Default value.
*
* - `DESC` for descending.
*
- * The supported syntax are:
+ * The supported syntax are when `useAdminAccess` is set to `true`:
*
* - `membership_count.joined_direct_human_user_count DESC`
* - `membership_count.joined_direct_human_user_count ASC`
@@ -1747,6 +1957,11 @@ public com.google.protobuf.ByteString getOrderByBytes() {
* - `last_active_time ASC`
* - `create_time DESC`
* - `create_time ASC`
+ *
+ * When `useAdminAccess` is set to `false`:
+ *
+ * - `create_time DESC`
+ * - `relevance DESC`
*
*
* string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
@@ -1778,13 +1993,17 @@ public Builder setOrderBy(java.lang.String value) {
* any topic of this space.
* - `create_time` — Denotes the time of the space creation.
*
+ * When `useAdminAccess` is `false`, only `create_time` and `relevance` are
+ * supported for ordering. Only `DESC` is supported for these fields in
+ * non-admin searches.
+ *
* Valid ordering operation values are:
*
* - `ASC` for ascending. Default value.
*
* - `DESC` for descending.
*
- * The supported syntax are:
+ * The supported syntax are when `useAdminAccess` is set to `true`:
*
* - `membership_count.joined_direct_human_user_count DESC`
* - `membership_count.joined_direct_human_user_count ASC`
@@ -1792,6 +2011,11 @@ public Builder setOrderBy(java.lang.String value) {
* - `last_active_time ASC`
* - `create_time DESC`
* - `create_time ASC`
+ *
+ * When `useAdminAccess` is set to `false`:
+ *
+ * - `create_time DESC`
+ * - `relevance DESC`
*
*
* string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
@@ -1819,13 +2043,17 @@ public Builder clearOrderBy() {
* any topic of this space.
* - `create_time` — Denotes the time of the space creation.
*
+ * When `useAdminAccess` is `false`, only `create_time` and `relevance` are
+ * supported for ordering. Only `DESC` is supported for these fields in
+ * non-admin searches.
+ *
* Valid ordering operation values are:
*
* - `ASC` for ascending. Default value.
*
* - `DESC` for descending.
*
- * The supported syntax are:
+ * The supported syntax are when `useAdminAccess` is set to `true`:
*
* - `membership_count.joined_direct_human_user_count DESC`
* - `membership_count.joined_direct_human_user_count ASC`
@@ -1833,6 +2061,11 @@ public Builder clearOrderBy() {
* - `last_active_time ASC`
* - `create_time DESC`
* - `create_time ASC`
+ *
+ * When `useAdminAccess` is set to `false`:
+ *
+ * - `create_time DESC`
+ * - `relevance DESC`
*
*
* string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesRequestOrBuilder.java
index fcf30852fe29..047701828a8f 100644
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesRequestOrBuilder.java
+++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesRequestOrBuilder.java
@@ -40,9 +40,6 @@ public interface SearchSpacesRequestOrBuilder
* Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
* [OAuth 2.0
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
- *
- * This method currently only supports admin access, thus only `true` is
- * accepted for this field.
*
*
* bool use_admin_access = 1;
@@ -112,7 +109,8 @@ public interface SearchSpacesRequestOrBuilder
*
* Required. A search query.
*
- * You can search by using the following parameters:
+ * You can search by using the following parameters when `useAdminAccess`
+ * is set to `true`:
*
* - `create_time`
* - `customer`
@@ -122,18 +120,27 @@ public interface SearchSpacesRequestOrBuilder
* - `space_history_state`
* - `space_type`
*
+ * When `useAdminAccess` is set to `false`:
+ *
+ * - `display_name`
+ * - `external_user_allowed`
+ * - `space_type`
+ *
* `create_time` and `last_active_time` accept a timestamp in
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
* comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
*
- * `customer` is required and is used to indicate which customer
- * to fetch spaces from. `customers/my_customer` is the only supported value.
+ * `customer` is required when `useAdminAccess` is set to `true`, and is
+ * used to indicate which customer to fetch spaces from.
+ * `customers/my_customer` is the only supported value.
*
* `display_name` only accepts the `HAS` (`:`) operator. The text to
* match is first tokenized into tokens and each token is prefix-matched
* case-insensitively and independently as a substring anywhere in the space's
* `display_name`. For example, `Fun Eve` matches `Fun event` or `The
- * evening was fun`, but not `notFun event` or `even`.
+ * evening was fun`, but not `notFun event` or `even`. When `useAdminAccess`
+ * is set to `false`, `display_name` is required to retrieve meaningful
+ * results. Otherwise, the default behavior is to return an empty response.
*
* `external_user_allowed` accepts either `true` or `false`.
*
@@ -156,7 +163,8 @@ public interface SearchSpacesRequestOrBuilder
* < "2022-01-01T00:00:00+00:00" AND last_active_time >
* "2023-01-01T00:00:00+00:00"`.
*
- * The following example queries are valid:
+ * The following example queries are valid when `useAdminAccess` is set to
+ * `true`:
*
* ```
* customer = "customers/my_customer" AND space_type = "SPACE"
@@ -178,6 +186,21 @@ public interface SearchSpacesRequestOrBuilder
* "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
* (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
* ```
+ *
+ * The following example queries are valid when `useAdminAccess` is set to
+ * `false`:
+ *
+ * ```
+ * display_name:"Hello World" AND space_type = "SPACE"
+ *
+ * (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
+ *
+ * (external_user_allowed = "true" AND space_type = "SPACE") // Returns an
+ * empty response.
+ *
+ * (external_user_allowed = "true" AND display_name:"Hello" AND space_type =
+ * "SPACE")
+ * ```
*
*
* string query = 4 [(.google.api.field_behavior) = REQUIRED];
@@ -192,7 +215,8 @@ public interface SearchSpacesRequestOrBuilder
*
* Required. A search query.
*
- * You can search by using the following parameters:
+ * You can search by using the following parameters when `useAdminAccess`
+ * is set to `true`:
*
* - `create_time`
* - `customer`
@@ -202,18 +226,27 @@ public interface SearchSpacesRequestOrBuilder
* - `space_history_state`
* - `space_type`
*
+ * When `useAdminAccess` is set to `false`:
+ *
+ * - `display_name`
+ * - `external_user_allowed`
+ * - `space_type`
+ *
* `create_time` and `last_active_time` accept a timestamp in
* [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
* comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
*
- * `customer` is required and is used to indicate which customer
- * to fetch spaces from. `customers/my_customer` is the only supported value.
+ * `customer` is required when `useAdminAccess` is set to `true`, and is
+ * used to indicate which customer to fetch spaces from.
+ * `customers/my_customer` is the only supported value.
*
* `display_name` only accepts the `HAS` (`:`) operator. The text to
* match is first tokenized into tokens and each token is prefix-matched
* case-insensitively and independently as a substring anywhere in the space's
* `display_name`. For example, `Fun Eve` matches `Fun event` or `The
- * evening was fun`, but not `notFun event` or `even`.
+ * evening was fun`, but not `notFun event` or `even`. When `useAdminAccess`
+ * is set to `false`, `display_name` is required to retrieve meaningful
+ * results. Otherwise, the default behavior is to return an empty response.
*
* `external_user_allowed` accepts either `true` or `false`.
*
@@ -236,7 +269,8 @@ public interface SearchSpacesRequestOrBuilder
* < "2022-01-01T00:00:00+00:00" AND last_active_time >
* "2023-01-01T00:00:00+00:00"`.
*
- * The following example queries are valid:
+ * The following example queries are valid when `useAdminAccess` is set to
+ * `true`:
*
* ```
* customer = "customers/my_customer" AND space_type = "SPACE"
@@ -258,6 +292,21 @@ public interface SearchSpacesRequestOrBuilder
* "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
* (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
* ```
+ *
+ * The following example queries are valid when `useAdminAccess` is set to
+ * `false`:
+ *
+ * ```
+ * display_name:"Hello World" AND space_type = "SPACE"
+ *
+ * (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
+ *
+ * (external_user_allowed = "true" AND space_type = "SPACE") // Returns an
+ * empty response.
+ *
+ * (external_user_allowed = "true" AND display_name:"Hello" AND space_type =
+ * "SPACE")
+ * ```
*
*
* string query = 4 [(.google.api.field_behavior) = REQUIRED];
@@ -280,13 +329,17 @@ public interface SearchSpacesRequestOrBuilder
* any topic of this space.
* - `create_time` — Denotes the time of the space creation.
*
+ * When `useAdminAccess` is `false`, only `create_time` and `relevance` are
+ * supported for ordering. Only `DESC` is supported for these fields in
+ * non-admin searches.
+ *
* Valid ordering operation values are:
*
* - `ASC` for ascending. Default value.
*
* - `DESC` for descending.
*
- * The supported syntax are:
+ * The supported syntax are when `useAdminAccess` is set to `true`:
*
* - `membership_count.joined_direct_human_user_count DESC`
* - `membership_count.joined_direct_human_user_count ASC`
@@ -294,6 +347,11 @@ public interface SearchSpacesRequestOrBuilder
* - `last_active_time ASC`
* - `create_time DESC`
* - `create_time ASC`
+ *
+ * When `useAdminAccess` is set to `false`:
+ *
+ * - `create_time DESC`
+ * - `relevance DESC`
*
*
* string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
@@ -316,13 +374,17 @@ public interface SearchSpacesRequestOrBuilder
* any topic of this space.
* - `create_time` — Denotes the time of the space creation.
*
+ * When `useAdminAccess` is `false`, only `create_time` and `relevance` are
+ * supported for ordering. Only `DESC` is supported for these fields in
+ * non-admin searches.
+ *
* Valid ordering operation values are:
*
* - `ASC` for ascending. Default value.
*
* - `DESC` for descending.
*
- * The supported syntax are:
+ * The supported syntax are when `useAdminAccess` is set to `true`:
*
* - `membership_count.joined_direct_human_user_count DESC`
* - `membership_count.joined_direct_human_user_count ASC`
@@ -330,6 +392,11 @@ public interface SearchSpacesRequestOrBuilder
* - `last_active_time ASC`
* - `create_time DESC`
* - `create_time ASC`
+ *
+ * When `useAdminAccess` is set to `false`:
+ *
+ * - `create_time DESC`
+ * - `relevance DESC`
*
*
* string order_by = 5 [(.google.api.field_behavior) = OPTIONAL];
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesResponse.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesResponse.java
index bca9f2bf5ae9..b65d1b1ce107 100644
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesResponse.java
+++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SearchSpacesResponse.java
@@ -54,6 +54,7 @@ private SearchSpacesResponse(com.google.protobuf.GeneratedMessage.Builder> bui
private SearchSpacesResponse() {
spaces_ = java.util.Collections.emptyList();
nextPageToken_ = "";
+ results_ = java.util.Collections.emptyList();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
@@ -71,6 +72,717 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
com.google.chat.v1.SearchSpacesResponse.Builder.class);
}
+ public interface SearchSpaceResultOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.chat.v1.SearchSpacesResponse.SearchSpaceResult)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * Output only. The matched space.
+ *
+ *
+ * .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return Whether the space field is set.
+ */
+ boolean hasSpace();
+
+ /**
+ *
+ *
+ *
+ * Output only. The matched space.
+ *
+ *
+ * .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The space.
+ */
+ com.google.chat.v1.Space getSpace();
+
+ /**
+ *
+ *
+ *
+ * Output only. The matched space.
+ *
+ *
+ * .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ com.google.chat.v1.SpaceOrBuilder getSpaceOrBuilder();
+ }
+
+ /**
+ *
+ *
+ *
+ * A single result item from a space search.
+ *
+ *
+ * Protobuf type {@code google.chat.v1.SearchSpacesResponse.SearchSpaceResult}
+ */
+ public static final class SearchSpaceResult extends com.google.protobuf.GeneratedMessage
+ implements
+ // @@protoc_insertion_point(message_implements:google.chat.v1.SearchSpacesResponse.SearchSpaceResult)
+ SearchSpaceResultOrBuilder {
+ 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= */ "",
+ "SearchSpaceResult");
+ }
+
+ // Use SearchSpaceResult.newBuilder() to construct.
+ private SearchSpaceResult(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ }
+
+ private SearchSpaceResult() {}
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.chat.v1.SpaceProto
+ .internal_static_google_chat_v1_SearchSpacesResponse_SearchSpaceResult_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.chat.v1.SpaceProto
+ .internal_static_google_chat_v1_SearchSpacesResponse_SearchSpaceResult_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult.class,
+ com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int SPACE_FIELD_NUMBER = 1;
+ private com.google.chat.v1.Space space_;
+
+ /**
+ *
+ *
+ *
+ * Output only. The matched space.
+ *
+ *
+ * .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return Whether the space field is set.
+ */
+ @java.lang.Override
+ public boolean hasSpace() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The matched space.
+ *
+ *
+ * .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The space.
+ */
+ @java.lang.Override
+ public com.google.chat.v1.Space getSpace() {
+ return space_ == null ? com.google.chat.v1.Space.getDefaultInstance() : space_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The matched space.
+ *
+ *
+ * .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ @java.lang.Override
+ public com.google.chat.v1.SpaceOrBuilder getSpaceOrBuilder() {
+ return space_ == null ? com.google.chat.v1.Space.getDefaultInstance() : space_;
+ }
+
+ 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, getSpace());
+ }
+ 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, getSpace());
+ }
+ 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.SearchSpacesResponse.SearchSpaceResult)) {
+ return super.equals(obj);
+ }
+ com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult other =
+ (com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult) obj;
+
+ if (hasSpace() != other.hasSpace()) return false;
+ if (hasSpace()) {
+ if (!getSpace().equals(other.getSpace())) 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 (hasSpace()) {
+ hash = (37 * hash) + SPACE_FIELD_NUMBER;
+ hash = (53 * hash) + getSpace().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult 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.SearchSpacesResponse.SearchSpaceResult parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult 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.SearchSpacesResponse.SearchSpaceResult parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult 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.SearchSpacesResponse.SearchSpaceResult parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult 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.SearchSpacesResponse.SearchSpaceResult parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult 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.SearchSpacesResponse.SearchSpaceResult 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 space search.
+ *
+ *
+ * Protobuf type {@code google.chat.v1.SearchSpacesResponse.SearchSpaceResult}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder
+ * Output only. The matched space.
+ *
+ *
+ * .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return Whether the space field is set.
+ */
+ public boolean hasSpace() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The matched space.
+ *
+ *
+ * .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ * @return The space.
+ */
+ public com.google.chat.v1.Space getSpace() {
+ if (spaceBuilder_ == null) {
+ return space_ == null ? com.google.chat.v1.Space.getDefaultInstance() : space_;
+ } else {
+ return spaceBuilder_.getMessage();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The matched space.
+ *
+ *
+ * .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ public Builder setSpace(com.google.chat.v1.Space value) {
+ if (spaceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ space_ = value;
+ } else {
+ spaceBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The matched space.
+ *
+ *
+ * .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ public Builder setSpace(com.google.chat.v1.Space.Builder builderForValue) {
+ if (spaceBuilder_ == null) {
+ space_ = builderForValue.build();
+ } else {
+ spaceBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The matched space.
+ *
+ *
+ * .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ public Builder mergeSpace(com.google.chat.v1.Space value) {
+ if (spaceBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)
+ && space_ != null
+ && space_ != com.google.chat.v1.Space.getDefaultInstance()) {
+ getSpaceBuilder().mergeFrom(value);
+ } else {
+ space_ = value;
+ }
+ } else {
+ spaceBuilder_.mergeFrom(value);
+ }
+ if (space_ != null) {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The matched space.
+ *
+ *
+ * .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ public Builder clearSpace() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ space_ = null;
+ if (spaceBuilder_ != null) {
+ spaceBuilder_.dispose();
+ spaceBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The matched space.
+ *
+ *
+ * .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ public com.google.chat.v1.Space.Builder getSpaceBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return internalGetSpaceFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The matched space.
+ *
+ *
+ * .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ public com.google.chat.v1.SpaceOrBuilder getSpaceOrBuilder() {
+ if (spaceBuilder_ != null) {
+ return spaceBuilder_.getMessageOrBuilder();
+ } else {
+ return space_ == null ? com.google.chat.v1.Space.getDefaultInstance() : space_;
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The matched space.
+ *
+ *
+ * .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ com.google.chat.v1.Space,
+ com.google.chat.v1.Space.Builder,
+ com.google.chat.v1.SpaceOrBuilder>
+ internalGetSpaceFieldBuilder() {
+ if (spaceBuilder_ == null) {
+ spaceBuilder_ =
+ new com.google.protobuf.SingleFieldBuilder<
+ com.google.chat.v1.Space,
+ com.google.chat.v1.Space.Builder,
+ com.google.chat.v1.SpaceOrBuilder>(getSpace(), getParentForChildren(), isClean());
+ space_ = null;
+ }
+ return spaceBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.chat.v1.SearchSpacesResponse.SearchSpaceResult)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.chat.v1.SearchSpacesResponse.SearchSpaceResult)
+ private static final com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult();
+ }
+
+ public static com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
@java.lang.Override
+ @java.lang.Deprecated
public java.util.List
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
@java.lang.Override
+ @java.lang.Deprecated
public java.util.List extends com.google.chat.v1.SpaceOrBuilder> getSpacesOrBuilderList() {
return spaces_;
}
@@ -108,12 +828,16 @@ public java.util.List extends com.google.chat.v1.SpaceOrBuilder> getSpacesOrBu
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
@java.lang.Override
+ @java.lang.Deprecated
public int getSpacesCount() {
return spaces_.size();
}
@@ -122,12 +846,16 @@ public int getSpacesCount() {
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
@java.lang.Override
+ @java.lang.Deprecated
public com.google.chat.v1.Space getSpaces(int index) {
return spaces_.get(index);
}
@@ -136,12 +864,16 @@ public com.google.chat.v1.Space getSpaces(int index) {
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
@java.lang.Override
+ @java.lang.Deprecated
public com.google.chat.v1.SpaceOrBuilder getSpacesOrBuilder(int index) {
return spaces_.get(index);
}
@@ -212,13 +944,102 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() {
* result is over 10,000 spaces, this value is an estimate.
*
*
- * int32 total_size = 3;
- *
- * @return The totalSize.
+ * int32 total_size = 3;
+ *
+ * @return The totalSize.
+ */
+ @java.lang.Override
+ public int getTotalSize() {
+ return totalSize_;
+ }
+
+ public static final int RESULTS_FIELD_NUMBER = 4;
+
+ @SuppressWarnings("serial")
+ private java.util.List
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ @java.lang.Override
+ public java.util.List
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ @java.lang.Override
+ public java.util.List<
+ ? extends com.google.chat.v1.SearchSpacesResponse.SearchSpaceResultOrBuilder>
+ getResultsOrBuilderList() {
+ return results_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ @java.lang.Override
+ public int getResultsCount() {
+ return results_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ @java.lang.Override
+ public com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult getResults(int index) {
+ return results_.get(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
*/
@java.lang.Override
- public int getTotalSize() {
- return totalSize_;
+ public com.google.chat.v1.SearchSpacesResponse.SearchSpaceResultOrBuilder getResultsOrBuilder(
+ int index) {
+ return results_.get(index);
}
private byte memoizedIsInitialized = -1;
@@ -244,6 +1065,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (totalSize_ != 0) {
output.writeInt32(3, totalSize_);
}
+ for (int i = 0; i < results_.size(); i++) {
+ output.writeMessage(4, results_.get(i));
+ }
getUnknownFields().writeTo(output);
}
@@ -262,6 +1086,9 @@ public int getSerializedSize() {
if (totalSize_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, totalSize_);
}
+ for (int i = 0; i < results_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, results_.get(i));
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -280,6 +1107,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getSpacesList().equals(other.getSpacesList())) return false;
if (!getNextPageToken().equals(other.getNextPageToken())) return false;
if (getTotalSize() != other.getTotalSize()) return false;
+ if (!getResultsList().equals(other.getResultsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -299,6 +1127,10 @@ public int hashCode() {
hash = (53 * hash) + getNextPageToken().hashCode();
hash = (37 * hash) + TOTAL_SIZE_FIELD_NUMBER;
hash = (53 * hash) + getTotalSize();
+ if (getResultsCount() > 0) {
+ hash = (37 * hash) + RESULTS_FIELD_NUMBER;
+ hash = (53 * hash) + getResultsList().hashCode();
+ }
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
@@ -448,6 +1280,13 @@ public Builder clear() {
bitField0_ = (bitField0_ & ~0x00000001);
nextPageToken_ = "";
totalSize_ = 0;
+ if (resultsBuilder_ == null) {
+ results_ = java.util.Collections.emptyList();
+ } else {
+ results_ = null;
+ resultsBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
@@ -493,6 +1332,15 @@ private void buildPartialRepeatedFields(com.google.chat.v1.SearchSpacesResponse
} else {
result.spaces_ = spacesBuilder_.build();
}
+ if (resultsBuilder_ == null) {
+ if (((bitField0_ & 0x00000008) != 0)) {
+ results_ = java.util.Collections.unmodifiableList(results_);
+ bitField0_ = (bitField0_ & ~0x00000008);
+ }
+ result.results_ = results_;
+ } else {
+ result.results_ = resultsBuilder_.build();
+ }
}
private void buildPartial0(com.google.chat.v1.SearchSpacesResponse result) {
@@ -552,6 +1400,33 @@ public Builder mergeFrom(com.google.chat.v1.SearchSpacesResponse other) {
if (other.getTotalSize() != 0) {
setTotalSize(other.getTotalSize());
}
+ if (resultsBuilder_ == null) {
+ if (!other.results_.isEmpty()) {
+ if (results_.isEmpty()) {
+ results_ = other.results_;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ } else {
+ ensureResultsIsMutable();
+ results_.addAll(other.results_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.results_.isEmpty()) {
+ if (resultsBuilder_.isEmpty()) {
+ resultsBuilder_.dispose();
+ resultsBuilder_ = null;
+ results_ = other.results_;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ resultsBuilder_ =
+ com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders
+ ? internalGetResultsFieldBuilder()
+ : null;
+ } else {
+ resultsBuilder_.addAllMessages(other.results_);
+ }
+ }
+ }
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
@@ -602,6 +1477,20 @@ public Builder mergeFrom(
bitField0_ |= 0x00000004;
break;
} // case 24
+ case 34:
+ {
+ com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult m =
+ input.readMessage(
+ com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult.parser(),
+ extensionRegistry);
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.add(m);
+ } else {
+ resultsBuilder_.addMessage(m);
+ }
+ break;
+ } // case 34
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -640,11 +1529,15 @@ private void ensureSpacesIsMutable() {
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
public java.util.List
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
public int getSpacesCount() {
if (spacesBuilder_ == null) {
return spaces_.size();
@@ -674,11 +1571,15 @@ public int getSpacesCount() {
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
public com.google.chat.v1.Space getSpaces(int index) {
if (spacesBuilder_ == null) {
return spaces_.get(index);
@@ -691,11 +1592,15 @@ public com.google.chat.v1.Space getSpaces(int index) {
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
public Builder setSpaces(int index, com.google.chat.v1.Space value) {
if (spacesBuilder_ == null) {
if (value == null) {
@@ -714,11 +1619,15 @@ public Builder setSpaces(int index, com.google.chat.v1.Space value) {
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
public Builder setSpaces(int index, com.google.chat.v1.Space.Builder builderForValue) {
if (spacesBuilder_ == null) {
ensureSpacesIsMutable();
@@ -734,11 +1643,15 @@ public Builder setSpaces(int index, com.google.chat.v1.Space.Builder builderForV
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
public Builder addSpaces(com.google.chat.v1.Space value) {
if (spacesBuilder_ == null) {
if (value == null) {
@@ -757,11 +1670,15 @@ public Builder addSpaces(com.google.chat.v1.Space value) {
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
public Builder addSpaces(int index, com.google.chat.v1.Space value) {
if (spacesBuilder_ == null) {
if (value == null) {
@@ -780,11 +1697,15 @@ public Builder addSpaces(int index, com.google.chat.v1.Space value) {
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
public Builder addSpaces(com.google.chat.v1.Space.Builder builderForValue) {
if (spacesBuilder_ == null) {
ensureSpacesIsMutable();
@@ -800,11 +1721,15 @@ public Builder addSpaces(com.google.chat.v1.Space.Builder builderForValue) {
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
public Builder addSpaces(int index, com.google.chat.v1.Space.Builder builderForValue) {
if (spacesBuilder_ == null) {
ensureSpacesIsMutable();
@@ -820,11 +1745,15 @@ public Builder addSpaces(int index, com.google.chat.v1.Space.Builder builderForV
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
public Builder addAllSpaces(java.lang.Iterable extends com.google.chat.v1.Space> values) {
if (spacesBuilder_ == null) {
ensureSpacesIsMutable();
@@ -840,11 +1769,15 @@ public Builder addAllSpaces(java.lang.Iterable extends com.google.chat.v1.Spac
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
public Builder clearSpaces() {
if (spacesBuilder_ == null) {
spaces_ = java.util.Collections.emptyList();
@@ -860,11 +1793,15 @@ public Builder clearSpaces() {
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
public Builder removeSpaces(int index) {
if (spacesBuilder_ == null) {
ensureSpacesIsMutable();
@@ -880,11 +1817,15 @@ public Builder removeSpaces(int index) {
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
public com.google.chat.v1.Space.Builder getSpacesBuilder(int index) {
return internalGetSpacesFieldBuilder().getBuilder(index);
}
@@ -893,11 +1834,15 @@ public com.google.chat.v1.Space.Builder getSpacesBuilder(int index) {
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
public com.google.chat.v1.SpaceOrBuilder getSpacesOrBuilder(int index) {
if (spacesBuilder_ == null) {
return spaces_.get(index);
@@ -910,11 +1855,15 @@ public com.google.chat.v1.SpaceOrBuilder getSpacesOrBuilder(int index) {
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
public java.util.List extends com.google.chat.v1.SpaceOrBuilder> getSpacesOrBuilderList() {
if (spacesBuilder_ != null) {
return spacesBuilder_.getMessageOrBuilderList();
@@ -927,11 +1876,15 @@ public java.util.List extends com.google.chat.v1.SpaceOrBuilder> getSpacesOrBu
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
public com.google.chat.v1.Space.Builder addSpacesBuilder() {
return internalGetSpacesFieldBuilder()
.addBuilder(com.google.chat.v1.Space.getDefaultInstance());
@@ -941,11 +1894,15 @@ public com.google.chat.v1.Space.Builder addSpacesBuilder() {
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
public com.google.chat.v1.Space.Builder addSpacesBuilder(int index) {
return internalGetSpacesFieldBuilder()
.addBuilder(index, com.google.chat.v1.Space.getDefaultInstance());
@@ -955,11 +1912,15 @@ public com.google.chat.v1.Space.Builder addSpacesBuilder(int index) {
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
public java.util.List
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public java.util.List
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public int getResultsCount() {
+ if (resultsBuilder_ == null) {
+ return results_.size();
+ } else {
+ return resultsBuilder_.getCount();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult getResults(int index) {
+ if (resultsBuilder_ == null) {
+ return results_.get(index);
+ } else {
+ return resultsBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setResults(
+ int index, com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.set(index, value);
+ onChanged();
+ } else {
+ resultsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder setResults(
+ int index,
+ com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder addResults(com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.add(value);
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder addResults(
+ int index, com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.add(index, value);
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder addResults(
+ com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.add(builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder addResults(
+ int index,
+ com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder addAllResults(
+ java.lang.Iterable extends com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult>
+ values) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_);
+ onChanged();
+ } else {
+ resultsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder clearResults() {
+ if (resultsBuilder_ == null) {
+ results_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ onChanged();
+ } else {
+ resultsBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public Builder removeResults(int index) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.remove(index);
+ onChanged();
+ } else {
+ resultsBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult.Builder getResultsBuilder(
+ int index) {
+ return internalGetResultsFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.chat.v1.SearchSpacesResponse.SearchSpaceResultOrBuilder getResultsOrBuilder(
+ int index) {
+ if (resultsBuilder_ == null) {
+ return results_.get(index);
+ } else {
+ return resultsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public java.util.List<
+ ? extends com.google.chat.v1.SearchSpacesResponse.SearchSpaceResultOrBuilder>
+ getResultsOrBuilderList() {
+ if (resultsBuilder_ != null) {
+ return resultsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(results_);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult.Builder addResultsBuilder() {
+ return internalGetResultsFieldBuilder()
+ .addBuilder(
+ com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult.getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult.Builder addResultsBuilder(
+ int index) {
+ return internalGetResultsFieldBuilder()
+ .addBuilder(
+ index,
+ com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult.getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ public java.util.List
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
java.util.List
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
com.google.chat.v1.Space getSpaces(int index);
/**
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
int getSpacesCount();
/**
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
java.util.List extends com.google.chat.v1.SpaceOrBuilder> getSpacesOrBuilderList();
/**
*
*
*
- * A page of the requested spaces.
+ * Deprecated: Please use the new `results` field instead.
+ * A page of the requested spaces. This field will be populated only when
+ * `useAdminAccess` is set to `true` and deprecated in favor of the new
+ * `results` field.
*
*
- * repeated .google.chat.v1.Space spaces = 1;
+ * repeated .google.chat.v1.Space spaces = 1 [deprecated = true];
*/
+ @java.lang.Deprecated
com.google.chat.v1.SpaceOrBuilder getSpacesOrBuilder(int index);
/**
@@ -122,4 +142,70 @@ public interface SearchSpacesResponseOrBuilder
* @return The totalSize.
*/
int getTotalSize();
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ java.util.List
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ com.google.chat.v1.SearchSpacesResponse.SearchSpaceResult getResults(int index);
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ int getResultsCount();
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ java.util.List extends com.google.chat.v1.SearchSpacesResponse.SearchSpaceResultOrBuilder>
+ getResultsOrBuilderList();
+
+ /**
+ *
+ *
+ *
+ * Output only. The list of search results that matched the query.
+ *
+ *
+ *
+ * repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ *
+ */
+ com.google.chat.v1.SearchSpacesResponse.SearchSpaceResultOrBuilder getResultsOrBuilder(int index);
}
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/java/com/google/chat/v1/SpaceProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceProto.java
index aadf7c19d567..229705dd06c7 100644
--- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceProto.java
+++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SpaceProto.java
@@ -116,6 +116,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_chat_v1_SearchSpacesResponse_descriptor;
static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_google_chat_v1_SearchSpacesResponse_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_chat_v1_SearchSpacesResponse_SearchSpaceResult_descriptor;
+ static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_google_chat_v1_SearchSpacesResponse_SearchSpaceResult_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_chat_v1_DeleteSpaceRequest_descriptor;
static final com.google.protobuf.GeneratedMessage.FieldAccessorTable
@@ -290,12 +294,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\tpage_size\030\002 \001(\005\022\022\n\n"
+ "page_token\030\003 \001(\t\022\022\n"
+ "\005query\030\004 \001(\tB\003\340A\002\022\025\n"
- + "\010order_by\030\005 \001(\tB\003\340A\001\"j\n"
- + "\024SearchSpacesResponse\022%\n"
- + "\006spaces\030\001 \003(\0132\025.google.chat.v1.Space\022\027\n"
- + "\017next_page_token\030\002 \001(\t\022\022\n"
- + "\n"
- + "total_size\030\003 \001(\005\"d\n"
+ + "\010order_by\030\005 \001(\tB\003\340A\001\"\374\001\n"
+ + "\024SearchSpacesResponse\022)\n"
+ + "\006spaces\030\001 \003(\0132\025.google.chat.v1.SpaceB\002\030\001\022\027\n"
+ + "\017next_page_token\030\002 \001(\t\022\022\n\n"
+ + "total_size\030\003 \001(\005\022L\n"
+ + "\007results\030\004 \003(\0132"
+ + "6.google.chat.v1.SearchSpacesResponse.SearchSpaceResultB\003\340A\003\032>\n"
+ + "\021SearchSpaceResult\022)\n"
+ + "\005space\030\001 \001(\0132\025.google.chat.v1.SpaceB\003\340A\003\"d\n"
+ "\022DeleteSpaceRequest\022/\n"
+ "\004name\030\001 \001(\tB!\340A\002\372A\033\n"
+ "\031chat.googleapis.com/Space\022\035\n"
@@ -310,9 +317,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "\035SPACE_VIEW_RESOURCE_NAME_ONLY\020\003\022\027\n"
+ "\023SPACE_VIEW_EXPANDED\020\004B\243\001\n"
+ "\022com.google.chat.v1B\n"
- + "SpaceProtoP\001Z,cloud.google.com/go/chat/apiv1/ch"
- + "atpb;chatpb\242\002\013DYNAPIProto\252\002\023Google.Apps."
- + "Chat.V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026Google::Apps::Chat::V1b\006proto3"
+ + "SpaceProtoP\001Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\242\002"
+ + "\013DYNAPIProto\252\002\023Google.Apps.Chat.V1\312\002\023Goo"
+ + "gle\\Apps\\Chat\\V1\352\002\026Google::Apps::Chat::V1b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -500,7 +507,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_google_chat_v1_SearchSpacesResponse_descriptor,
new java.lang.String[] {
- "Spaces", "NextPageToken", "TotalSize",
+ "Spaces", "NextPageToken", "TotalSize", "Results",
+ });
+ internal_static_google_chat_v1_SearchSpacesResponse_SearchSpaceResult_descriptor =
+ internal_static_google_chat_v1_SearchSpacesResponse_descriptor.getNestedType(0);
+ internal_static_google_chat_v1_SearchSpacesResponse_SearchSpaceResult_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_google_chat_v1_SearchSpacesResponse_SearchSpaceResult_descriptor,
+ new java.lang.String[] {
+ "Space",
});
internal_static_google_chat_v1_DeleteSpaceRequest_descriptor =
getDescriptor().getMessageType(11);
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..a2fd4a9526e0 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).
@@ -415,19 +450,30 @@ service ChatService {
option (google.api.method_signature) = "";
}
- // Returns a list of spaces in a Google Workspace organization based on an
- // administrator's search. In the request, set `use_admin_access` to `true`.
- // For an example, see [Search for and manage
+ // Returns a list of spaces in a Google Workspace organization. For an
+ // example, see [Search for and manage
// spaces](https://developers.google.com/workspace/chat/search-manage-admin).
//
- // Requires [user
+ // When `use_admin_access` is set to `false`, the results are limited to
+ // spaces where the calling user is a joined member. To search with
+ // administrator privileges, set `use_admin_access` to `true`.
+ //
+ // Supports the following types of
+ // [authentication](https://developers.google.com/workspace/chat/authenticate-authorize):
+ //
+ // - [User
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
+ // with one of the following authorization scopes:
+ // - `https://www.googleapis.com/auth/chat.spaces.readonly`
+ // - `https://www.googleapis.com/auth/chat.spaces`
+ //
+ // - [User
// authentication with administrator
// privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges)
// and one of the following [authorization
// scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
- //
- // - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
- // - `https://www.googleapis.com/auth/chat.admin.spaces`
+ // - `https://www.googleapis.com/auth/chat.admin.spaces.readonly`
+ // - `https://www.googleapis.com/auth/chat.admin.spaces`
rpc SearchSpaces(SearchSpacesRequest) returns (SearchSpacesResponse) {
option (google.api.http) = {
get: "/v1/spaces:search"
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..b2750239eaa1 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;
}
@@ -765,9 +768,6 @@ message SearchSpacesRequest {
// Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces`
// [OAuth 2.0
// scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
- //
- // This method currently only supports admin access, thus only `true` is
- // accepted for this field.
bool use_admin_access = 1;
// The maximum number of spaces to return. The service may return fewer than
@@ -789,7 +789,8 @@ message SearchSpacesRequest {
// Required. A search query.
//
- // You can search by using the following parameters:
+ // You can search by using the following parameters when `useAdminAccess`
+ // is set to `true`:
//
// - `create_time`
// - `customer`
@@ -799,18 +800,27 @@ message SearchSpacesRequest {
// - `space_history_state`
// - `space_type`
//
+ // When `useAdminAccess` is set to `false`:
+ //
+ // - `display_name`
+ // - `external_user_allowed`
+ // - `space_type`
+ //
// `create_time` and `last_active_time` accept a timestamp in
// [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported
// comparison operators are: `=`, `<`, `>`, `<=`, `>=`.
//
- // `customer` is required and is used to indicate which customer
- // to fetch spaces from. `customers/my_customer` is the only supported value.
+ // `customer` is required when `useAdminAccess` is set to `true`, and is
+ // used to indicate which customer to fetch spaces from.
+ // `customers/my_customer` is the only supported value.
//
// `display_name` only accepts the `HAS` (`:`) operator. The text to
// match is first tokenized into tokens and each token is prefix-matched
// case-insensitively and independently as a substring anywhere in the space's
// `display_name`. For example, `Fun Eve` matches `Fun event` or `The
- // evening was fun`, but not `notFun event` or `even`.
+ // evening was fun`, but not `notFun event` or `even`. When `useAdminAccess`
+ // is set to `false`, `display_name` is required to retrieve meaningful
+ // results. Otherwise, the default behavior is to return an empty response.
//
// `external_user_allowed` accepts either `true` or `false`.
//
@@ -833,7 +843,8 @@ message SearchSpacesRequest {
// < "2022-01-01T00:00:00+00:00" AND last_active_time >
// "2023-01-01T00:00:00+00:00"`.
//
- // The following example queries are valid:
+ // The following example queries are valid when `useAdminAccess` is set to
+ // `true`:
//
// ```
// customer = "customers/my_customer" AND space_type = "SPACE"
@@ -855,6 +866,21 @@ message SearchSpacesRequest {
// "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
// (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
// ```
+ //
+ // The following example queries are valid when `useAdminAccess` is set to
+ // `false`:
+ //
+ // ```
+ // display_name:"Hello World" AND space_type = "SPACE"
+ //
+ // (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE"
+ //
+ // (external_user_allowed = "true" AND space_type = "SPACE") // Returns an
+ // empty response.
+ //
+ // (external_user_allowed = "true" AND display_name:"Hello" AND space_type =
+ // "SPACE")
+ // ```
string query = 4 [(google.api.field_behavior) = REQUIRED];
// Optional. How the list of spaces is ordered.
@@ -867,13 +893,17 @@ message SearchSpacesRequest {
// any topic of this space.
// - `create_time` — Denotes the time of the space creation.
//
+ // When `useAdminAccess` is `false`, only `create_time` and `relevance` are
+ // supported for ordering. Only `DESC` is supported for these fields in
+ // non-admin searches.
+ //
// Valid ordering operation values are:
//
// - `ASC` for ascending. Default value.
//
// - `DESC` for descending.
//
- // The supported syntax are:
+ // The supported syntax are when `useAdminAccess` is set to `true`:
//
// - `membership_count.joined_direct_human_user_count DESC`
// - `membership_count.joined_direct_human_user_count ASC`
@@ -881,13 +911,27 @@ message SearchSpacesRequest {
// - `last_active_time ASC`
// - `create_time DESC`
// - `create_time ASC`
+ //
+ // When `useAdminAccess` is set to `false`:
+ //
+ // - `create_time DESC`
+ // - `relevance DESC`
string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
}
// Response with a list of spaces corresponding to the search spaces request.
message SearchSpacesResponse {
- // A page of the requested spaces.
- repeated Space spaces = 1;
+ // A single result item from a space search.
+ message SearchSpaceResult {
+ // Output only. The matched space.
+ Space space = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+ }
+
+ // Deprecated: Please use the new `results` field instead.
+ // A page of the requested spaces. This field will be populated only when
+ // `useAdminAccess` is set to `true` and deprecated in favor of the new
+ // `results` field.
+ repeated Space spaces = 1 [deprecated = true];
// A token that can be used to retrieve the next page. If this field is empty,
// there are no subsequent pages.
@@ -896,6 +940,10 @@ message SearchSpacesResponse {
// The total number of spaces that match the query, across all pages. If the
// result is over 10,000 spaces, this value is an estimate.
int32 total_size = 3;
+
+ // Output only. The list of search results that matched the query.
+ repeated SearchSpaceResult results = 4
+ [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Request for deleting a space.
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